bytesmith

Nonresumable byte parser

https://github.com/byteverse/bytesmith

LTS Haskell 23.27:0.3.11.1
Stackage Nightly 2025-07-13:0.3.11.1
Latest on Hackage:0.3.11.1

See all snapshotsbytesmith appears in

BSD-3-Clause licensedbyAndrew Martin
Maintained by[email protected]
This version can be pinned in stack with:bytesmith-0.3.11.1@sha256:4217bfebc0a38ae9a24ee3133f44fa81ed1f1c386f4c937a41f13bafdd185393,2263
Used by 2 packages inlts-23.17(full list with versions):

Parse bytes as fast as possible. This is a nonresumable parserthat aggresively usesUnboxedSums to avoid performing anyallocations.

Changes

Revision history for bytesmith

0.3.11.1 – 2024-02-28

  • Update package metadata.
  • Remove dependency onrun-st library.

0.3.11.0 – 2024-01-05

  • AddData.Bytes.Parser.Latin.hexWord32.
  • AddData.Bytes.Parser.Latin.hexFixedWord(128|256).
  • AddData.Bytes.Parser.takeN.

0.3.10.0 – 2023-07-25

  • AddmapErrorEffectfully.
  • Correct the implementation ofsatisfy.
  • AddtakeUpTo.

0.3.9.1 – 2022-12-06

  • Build with GHC 9.4.

0.3.9.0 – 2022-07-14

  • Build with GHC 9.2.3.

0.3.8.0 – 2021-10-11

  • Addpeek andpeek' toData.Bytes.Parser.Latin.
  • Add inline pragmas to most functions to prevent cost centers.
  • Add support for WordRep-to-LiftedRep in Rebindable module.
  • Allow building with newer Contiguous.
  • Exportuneffectful.

0.3.7.0 – 2020-07-27

  • AddData.Bytes.Parser.Base128 module for Base-128 encoding.
  • AddData.Bytes.Parser.Leb128 module for LEB-128 encoding.Supports signed integers with zig-zag encoding.
  • AddskipWhile toData.Bytes.Parser.Latin.
  • ReexportendOfInput andisEndOfInput fromLatin.
  • AddcharInsensitive to ASCII module.
  • Correct implementation ofpeek andpeek'.

0.3.6.0 – 2020-03-04

  • Addchar12
  • AddskipTrailedBy2,skipTrailedBy3, and variantswith an unboxed result.
  • Addcstring
  • AddpeekRemaining
  • Addmeasure_ andmeasure_#, variants ofmeasurethat only give the byte count.
  • AddData.Bytes.Parser.Rebindable, the ultimate hack.
  • AddData.Bytes.Latin.takeTrailedBy

0.3.5.0 – 2020-02-10

  • Add big-endian and little-endianword256 andword256Array parsers.
  • AddhexFixedWord64.

0.3.4.0 – 2020-02-03

  • AddhexFixedWord32.

0.3.3.0 – 2020-01-22

  • AddhexWord8,hexWord16, andhexFixedWord8.

0.3.2.0 – 2019-12-27

  • AddparseBytesEither andparseBytesMaybe.
  • Add common idioms from other parser libaries. This includes:satisfy,satisfyWith,scan,peek, andpeek'.

0.3.1.0 – 2019-11-12

  • Add big-endian and little-endian parsers forWord128.
  • Add a module for little-endian word parsers. This compliments theexisting big-endian module.
  • Add functions for parsing arrays of big/little endian words ofvarious sizes.
  • AddskipUntil toLatin.
  • Addchar5,char6,char7,char8,char9,char10, andchar11 toLatin.
  • Correct the implementation oftakeTrailedBy.

0.3.0.0 – 2019-09-30

  • Include the offset into the byte sequence inResult. Breaking change.
  • RenamehexWord16 tohexFixedWord16. Breaking change.
  • RenameparseBytesST toparseBytesEffectfully. Breaking change.
  • AddhexNibbleLower andtryHexNibbleLower.
  • AddhexNibble andtryHexNibble.

0.2.0.1 – 2019-09-24

  • Correct an overflow-detection mistake in the implementationof machine-word parsers.

0.2.0.0 – 2019-09-24

  • Add big-endian word parsers.
  • Redo module structure so that encoding-specific functions eachlive in their own module.
  • Add a lot more functions and attempt to make naming somewhatconsistent.
  • Adddelimit.
  • Addreplicate.
  • Addannotate and its infix synonym<?>.

0.1.0.0 – 2019-08-22

  • First version.