class BinData::BitField

Defined in:

bindata/bitfield.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

NOTE a BitField holds only immutable layout (@bitsize/@mappings), set once at class-definition time. #read/#write keep no per-operation state, so the per-class instance can be shared across fibers safely.


[View source]

Instance Method Detail

def apply #

[View source]
def bits(size, name) #

[View source]
def read(input, format) : Hash(String, Value) #

[View source]
def shift(buffer, num_bits, start_byte = 0) #

[View source]
def write(io, format, values : Hash(String, Value)) #

ameba:disable Metrics/CyclomaticComplexity


[View source]