class Zip::Version

Overview

Version identifier used to identify the version needed to extract a given file and to indicate the format of the external file attributes.

See section 4.4.3.2 of APPNOTE.TXT for version details.

Example:

# create version and print it out
version = Zip::Version.new(5, 0)
puts "version = #{version}"

Defined in:

Constant Summary

DEFAULT = new(0, 0)

Default version made by, if unspecified.

NEEDED = new(2, 0)

Version needed to extract this entry (4.4.3.2).

ZIP64 = new(4, 6)

Version needed to extract Zip64 entries.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.new(major : Int32, minor : Int32, compat : Int32 = 0) #

Create a version identifier from a major number, minor number, and optional compatability number.

Example:

# create version and print it out
version = Zip::Version.new(5, 0)
puts "version = #{version}"

def self.new(v : UInt16) #

Create a version identifier from a major number, minor number, and optional compatability number.

You shouldn't need to call this constructor directly; it is used by internal classes.


Instance Method Detail

def to_io(io) #

Write version as 16-bit, little-endian integer and return number of bytes written.

You shouldn't need to call this method directly; it is used by internal classes.


def to_s(io) #

Write version as string.

# create version and print it out
version = Zip::Version.new(5, 0)
puts "version = #{version}"