Class: LibMsPack::MsCab::MsCabdFolder
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- LibMsPack::MsCab::MsCabdFolder
- Defined in:
- lib/libmspack/mscab.rb
Overview
A structure which represents a single folder in a cabinet or cabinet set.
A folder is a single compressed stream of data. When uncompressed, it holds the data of one or more files. A folder may be split across more than one cabinet.
Instance Method Summary collapse
-
#comp_type ⇒ Fixnum
The compression format used by this folder.
-
#compressionLevel ⇒ Fixnum
Returns the compression level used by a folder.
-
#compressionMethod ⇒ Fixnum
Returns the compression method used by a folder.
-
#next ⇒ MsCabdFolder?
A next folder in this cabinet or cabinet set, or nil if this is the final folder.
-
#num_blocks ⇒ Fixnum
The total number of data blocks used by this folder.
Instance Method Details
#comp_type ⇒ Fixnum
The compression format used by this folder.
#MsCabdCompMethod
should be used on this field to get the algorithm used. #MsCabdCompLevel
should be used to get the "compression level".
80 81 82 |
# File 'lib/libmspack/mscab.rb', line 80 def comp_type self[:comp_type] end |
#compressionLevel ⇒ Fixnum
Returns the compression level used by a folder.
103 104 105 |
# File 'lib/libmspack/mscab.rb', line 103 def compressionLevel MsCab::MsCabdCompLevel(comp_type) end |
#compressionMethod ⇒ Fixnum
Returns the compression method used by a folder.
96 97 98 |
# File 'lib/libmspack/mscab.rb', line 96 def compressionMethod MsCab::MsCabdCompMethod(comp_type) end |
#next ⇒ MsCabdFolder?
A next folder in this cabinet or cabinet set, or nil if this is the final folder.
70 71 72 73 |
# File 'lib/libmspack/mscab.rb', line 70 def next return nil if self[:next].pointer.address.zero? self[:next] end |
#num_blocks ⇒ Fixnum
The total number of data blocks used by this folder.
This includes data blocks present in other files, if this folder spans more than one cabinet.
89 90 91 |
# File 'lib/libmspack/mscab.rb', line 89 def num_blocks self[:num_blocks] end |