Note: Prior to version 0.3.4.0, this library was named
small-bytearray-builder
, not bytebuild
. The library
small-bytearray-builder
is now just a compatibility shim
to ease the migration process.
- Add support for building with GHC 9.10
- Restore import statement for
liftA2
to fix build for GHC 9.4.
- Remove all CPP
- Drop support for GHC < 9.4
- Drop support for text < 2.0
- Add
wordPaddedDec3
. - Add
Data.Bytes.Builder.Avro
. - Add
word16LEB128
. - Stop accepting versions of text lower than 2.0.
- Add
Data.Bytes.Builder.Unsafe.pasteUtf8TextJson#
for users who need to perform JSON string encoding without using a builder. - Add
Data.Bytes.Builder.textJsonString
when building with text 2.0+
- Add
runOntoLength
. - Allow building with GHC 9.6.
- Add VLQ builders for Word32 and Word64.
- Add chunks-to-builder function
- Add textUtf8 for copying text to builder with text-2.0 and newer
- Support GHC 9.4.
- Support GHC 9.2
- Inline pragmas for better LEB encoding perf
- Bump upper bound on tasty in test suite
- Add upper bound on base since this does not build with GHC 9.2.
- Add
rebuild
- Add
copyCons
for copying small byte sequences with extra byte in front - Use
zigzag
library from hackage - Seven eights encoding
- Finish out LEB for 32-bit and signed 32/64
- Add
cstring#
- Add
ToBuilder
andToBoundedBuilder
classes - Add quasiquoter named
bldr
inData.Bytes.Builder.Template
.
- Fix
doubleDec
, which was encoding small numbers incorrectly. - Add
runByteString
for producingByteString
from bounded builders. - Add
cstring#
for producing builder fromAddr#
. - Correct the required length calculation for json string encoding.
- Fix build error in test suite.
- Add
ascii7
andascii8
. - Performance tweak for json string escape builder.
- Add
replicate
. - Fix compatibility with
primitive-0.7.1.0
.
- Add
wordLEB128
andword64LEB128
. - Add
integerDec
andnaturalDec
. - Add
word48PaddedLowerHex
. - Add
newBuilderState
,closeBuilderState
,commitDistance
, andcommitDistance1
to the unsafe module.
- Rename the library from
small-bytearray-builder
tobytebuild
, and move modules from theData.ByteArray
namespace to theData.Bytes
namespace. This is not considered a breaking change sincesmall-bytearray-builder
continues to exist as a compatibility shim, reexporting the modules with their old names. - Add
wordPaddedDec4
. - Add
reversedOnto
andcommitsOntoChunks
. - Add
ascii(2|3|4|5|6)
. - Add
cstringLen
unbounded builder. - Add
copy2
.
- Add
word64PaddedLowerHex
andword32PaddedLowerHex
- Add
word256Array{LE,BE}
andword256{LE,BE}
- Add
word{128,256}Padded{Lower,Upper}Hex
- Add
putMany
, which allows pasting into the same mutable byte array over and over. - Add
consLength
. - Add
putManyConsLength
, useful for chunked HTTP encoding. - Add
runOnto
- Add
Data.Bytes.Chunks.length
- Add
wordPaddedDec2
andwordPaddedDec9
. - Add
word8PaddedLowerHex
.
- Add big-endian and little-endian parsers for
Word128
. This includes both the single and multiple element variants. - Export
reverseCommitsOntoChunks
from theUnsafe
module. - Add
Semigroup
andMonoid
instances forChunks
. - Add
consLengthLE32
. - Add
fromEffect
to the unsafe interface.
- Breaking change: Change the internal implementation of
Builder
. This now works a lot more like the builder frombytestring
. It accumulates chunks and can do a zero-copy appends when working with a sufficiently large immutable chunk. This introduces a mild performance regression (around 10%), but it makes the libary more generally useful. - Introduce
consLengthBE32
andconsLength64BE
for efficient serialization of wire protocols that require prefixing a payload with its length. - Add
int{16,32,64}BE
andint{16,32,64LE}
as conveniences. - Add little-endian encoding functions for
Word16
,Word32
, andWord64
. - Add big-endian and little-endian functions for copying a
PrimArray
of numbers (both signed and unsigned) into a builder. - Add
flush
,copy
, andinsert
for better control when converting byte sequences to builders. - Add
shortByteString
to improve interoperability with thebytestring
library.
- Stop exporting data constructor in
Data.ByteArray.Builder
. This is technically a breaking change, but it was only exported by accident. So, with this release, we will technically violate PVP, and the previous release will be deprecated on hackage. - Add more functions for encoding unsigned words:
word16PaddedLowerHex
,word16LowerHex
,word16UpperHex
,word8LowerHex
. - Unroll loop for
word8Dec
.
- Use
natural-arithmetic
to make manipulation of bounds possible. - Add more functions for encoding numbers. This includes
word8/16/32/64
andint8/16/32/64
. - Rename the modules.
- Correct a serious error in the implementation of
bytes
. - Make
pasteGrowST
accept an initial offset. - Add a
pasteGrowST
for length-indexed builders. - Add function for rendering floating-point numbers in a slightly inaccurate way.
- Add functions for encoding
ShortText
as UTF-8 and as a JSON string.
- Add several additional functions for encoding numbers.
- First version