The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
String#b
to mimic Ruby'sString
- Add a lot of examples in YARD documentation. These examples are checked using yard-doctest.
- Deprecate
BinStruct.force_binary
andStruct.force_binary
in favor of Ruby'sString#b
- Fix
String#to_s
when static_length is set.#to_s
was not aware of static length option.
- Add
Struct#attribute?
to check existence of an attribute. - Add
AbstractTLV.derive
to derive a new subclass from a concrete TLV class.
- Update and fix Yard documentation.
BitAddr
class is added. This class is used as aStructable
type to handle bitfield attributes.- Add
Struct.define_bit_attr
,.define_bit_attr_before
and.define_bit_attr_before
to define bitfield attributes.
Struct.define_bit_attr_on
is removed in favor ofStruct.define_bit_attr
. Bitfield attributes are now first class attributes, and no more an onverlay onInt
.
CString
andString
initializers now accepts:value
option to set string initial value.
IntString
initializer option:string
is renamed into:value
.
BinStruct::Fields
renamed intoBinStruct::Struct
, and*field*
methods are renamed into*attr*
or*attributes*
.BinStruct::Struct#inspect
: add a title line.
- Fix
BinStruct::ArrayOfInt#read_from_array
by usingvalue:
option. - Fix
BinStruct::IntString#calc_length
by using#from_human
instead of#read
. BinStruct::String#to_s
: force binary encoding.BinStruct::String#<<
: force binary encoding on argument before catenating.
- Initial release