bytepatch-0.2.0: Patch byte-representable data in a bytestream.
Safe HaskellNone
LanguageHaskell2010

BytePatch.Pretty.PascalText

Description

Newtype for manipulating length-prefixed strings.

This type is for UTF-8 Text that you intend to write out to a length-prefixed bytestring. The size of the length field is static. You essentially have to decide the maximum bytesize of the string on creation.

Synopsis

Documentation

newtype PascalText (n :: Nat) Source #

Constructors

PascalText 

Fields

Instances

Instances details
KnownNat n => PatchRep (PascalText n) Source # 
Instance details

Defined in BytePatch.Pretty.PascalText

i2be :: (Integral a, Bits a) => a -> ByteString Source #

Re-encode an Integer to a little-endian integer stored as a ByteString using the fewest bytes needed to represent it.

adapated from crypto-api 0.13.3, Crypto.Util.i2bs_unsized