Class: Cabriolet::Binary::OABStructures::PatchBlockHeader

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

Overview

OAB block header for patch files

Structure (20 bytes):

  • 4 bytes: flags (0=uncompressed, 1=LZX compressed)

  • 4 bytes: patch_size (compressed patch data size)

  • 4 bytes: target_size (decompressed output block size)

  • 4 bytes: source_size (base data needed for this block)

  • 4 bytes: crc (CRC32 of decompressed output)

Instance Method Summary collapse

Instance Method Details

#compressed?Boolean

Check if block is compressed

Returns:

  • (Boolean)


115
116
117
# File 'lib/cabriolet/binary/oab_structures.rb', line 115

def compressed?
  flags == 1
end

#uncompressed?Boolean

Check if block is uncompressed

Returns:

  • (Boolean)


122
123
124
# File 'lib/cabriolet/binary/oab_structures.rb', line 122

def uncompressed?
  flags.zero?
end