Class: Unified2::Constructor::ExtraConstruct

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/unified2/constructor/extra_construct.rb

Overview

Unified2 Construction

Instance Method Summary collapse

Instance Method Details

#padding_lengthObject

Sometimes the data needs extra padding



33
34
35
36
37
38
39
# File 'lib/unified2/constructor/extra_construct.rb', line 33

def padding_length
  if header.event_length > data.num_bytes
    header.event_length - data.num_bytes
  else
    0
  end
end