module BinaryParser::ByteSize

Overview

Calculate bytesize support

class Parser < BinaryParser
  uint8 :value1
  uint8 :value2
  include BinaryParser::ByteSize
end

parser = Parser.new
parser.bytesize # sizeof(UInt8) * 2

Defined in:

binary_parser/byte_size.cr