Class: Cabriolet::Binary::OABStructures::FullHeader

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/cabriolet/binary/oab_structures.rb

Overview

OAB header for full files (version 3.1)

Structure (16 bytes):

  • 4 bytes: version_hi (should be 3)

  • 4 bytes: version_lo (should be 1 for full files)

  • 4 bytes: block_max (maximum block size)

  • 4 bytes: target_size (decompressed output size)

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

Check if header is valid

Returns:

  • (Boolean)


31
32
33
# File 'lib/cabriolet/binary/oab_structures.rb', line 31

def valid?
  version_hi == 3 && version_lo == 1
end