Safe Haskell | None |
---|---|
Language | GHC2021 |
Null-terminated, then null-padded data.
This is defined using the composition of existing NullTerminate
and
NullPad
predicates, plus the re-associating binrep instances for the And
predicate combinator. It kind of just magically works.
Synopsis
- type NullTermPad (n :: Natural) = And NullTerminate (NullPad n)
- type NullTermPadded (n :: Natural) = Refined (NullTermPad n)
Documentation
type NullTermPad (n :: Natural) = And NullTerminate (NullPad n) Source #
Predicate for null-terminated, then null-padded data.
type NullTermPadded (n :: Natural) = Refined (NullTermPad n) Source #
Null-terminated data, which is then null-padded to the given length.
Instantiate with ByteString
for a null-padded C string.