class LibZip::Entry

One record of the central directory: what the archive stores about an entry, without reading the entry.

An Entry is an immutable snapshot taken when it was listed, so its metadata remains readable after the entry is removed and after the archive is closed. It isn’t a handle: pass the name to LibZip::File#read for the bytes.

entry = zip["docs/a.txt"]
entry.name                 # => "docs/a.txt"
entry.size                 # => 1234
entry.compression_method   # => LibZip::Entry::DEFLATED

Each accessor except name, index and directory? returns nil when the archive didn’t store that field, which a zip written by another tool is free to skip.

Entries come from LibZip::File#entries, each, [], find_entry, get_entry, glob, remove and rename; there’s no public constructor.