Class: MPQ::BlockTableEntry

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/mpq.rb

Overview

Each block table follows this format. Although ‘BinData` can handle bitfields (`flags` in this case), I had problems setting them up, so I settled for methods instead.

Instance Method Summary collapse

Instance Method Details

#compressed?Boolean

Returns:

  • (Boolean)


226
227
228
# File 'lib/mpq.rb', line 226

def compressed?
  (flags & 0x00000200) != 0
end

#encrypted?Boolean

Returns:

  • (Boolean)


230
231
232
# File 'lib/mpq.rb', line 230

def encrypted?
  (flags & 0x00010000) != 0
end

#file?Boolean

Returns:

  • (Boolean)


222
223
224
# File 'lib/mpq.rb', line 222

def file?
  (flags & 0x80000000) != 0
end

#single_unit?Boolean

Returns:

  • (Boolean)


234
235
236
# File 'lib/mpq.rb', line 234

def single_unit?
  (flags & 0x01000000) != 0
end