Class: Cabriolet::Binary::OABStructures::BlockHeader
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- Cabriolet::Binary::OABStructures::BlockHeader
- Defined in:
- lib/cabriolet/binary/oab_structures.rb
Overview
OAB block header for full files
Structure (16 bytes):
-
4 bytes: flags (0=uncompressed, 1=LZX compressed)
-
4 bytes: compressed_size
-
4 bytes: uncompressed_size
-
4 bytes: crc (CRC32 of decompressed data)
Instance Method Summary collapse
-
#compressed? ⇒ Boolean
Check if block is compressed.
-
#uncompressed? ⇒ Boolean
Check if block is uncompressed.
Instance Method Details
#compressed? ⇒ Boolean
Check if block is compressed
54 55 56 |
# File 'lib/cabriolet/binary/oab_structures.rb', line 54 def compressed? flags == 1 end |
#uncompressed? ⇒ Boolean
Check if block is uncompressed
61 62 63 |
# File 'lib/cabriolet/binary/oab_structures.rb', line 61 def uncompressed? flags.zero? end |