class Zip::Extra::Base

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

Instance Method Summary

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.


Instance Method Detail

def bytes_needed : UInt16 #

Return number of bytes needed for this Extra.


def code : UInt16 #

Identifier for this extra entry.


def code=(code) #

Identifier for this extra entry.


def data : Slice(UInt8) #

Data for this extra entry.


def data=(data) #

Data for this extra entry.


def to_s(io) : UInt16 #