export const writeBoolean = ( value ) : Buffer => value ? Buffer . from ( '01' , 'hex' ) : Buffer . from ( '00' , 'hex' ) ; export const readBoolean = ( buffer , offset ) : [ boolean , number ] => [ buffer [ offset ] !== 0x00 , 1 , ] ;