class Zip::Version
- Zip::Version
- Reference
- Object
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
-
.new(major : Int32, minor : Int32, compat : Int32 = 0)
Create a version identifier from a major number, minor number, and optional compatability number.
-
.new(v : UInt16)
Create a version identifier from a major number, minor number, and optional compatability number.
Instance Method Summary
-
#to_io(io)
Write version as 16-bit, little-endian integer and return number of bytes written.
-
#to_s(io)
Write version as string.
Class Method Detail
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}"
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
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.
Write version as string.
# create version and print it out
version = Zip::Version.new(5, 0)
puts "version = #{version}"