Class: Cabriolet::Binary::OABStructures::BlockHeader

Inherits:
BinData::Record
  • Object
show all
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

Instance Method Details

#compressed?Boolean

Check if block is compressed

Returns:

  • (Boolean)


54
55
56
# File 'lib/cabriolet/binary/oab_structures.rb', line 54

def compressed?
  flags == 1
end

#uncompressed?Boolean

Check if block is uncompressed

Returns:

  • (Boolean)


61
62
63
# File 'lib/cabriolet/binary/oab_structures.rb', line 61

def uncompressed?
  flags.zero?
end