class Zip::Extra::Base
- Zip::Extra::Base
- Reference
- Object
Overview
Raw extra data associated with Entry
.
You should not need to instantiate this class directly; use
Zip::Entry#extras
or Zip::Entry#local_extras
instead.
Example:
# open "foo.zip"
Zip.read("foo.zip") do |zip|
# get extra data associated with "bar.txt"
extras = zip["bar.txt"].extras
end
Direct Known Subclasses
Defined in:
Class Method Summary
-
.new(code : UInt16, data : Bytes)
Create a new raw extra data entry.
Instance Method Summary
-
#bytes_needed : UInt16
Return number of bytes needed for this Extra.
-
#code : UInt16
Identifier for this extra entry.
-
#code=(code)
Identifier for this extra entry.
-
#data : Slice(UInt8)
Data for this extra entry.
-
#data=(data)
Data for this extra entry.
- #to_s(io) : UInt16
Class Method Detail
def self.new(code : UInt16, data : Bytes)
#
Create a new raw extra data entry.
You should not need to instantiate this class directly; it is
created as-needed by Writer#add
.