Slicing managed and unmanaged memory

Version on this page:
Stackage Nightly 2020-01-25:
Latest on Hackage:

See all snapshots byteslice appears in

BSD-3-Clause licensed by Andrew Martin

Module documentation for

This version can be pinned in stack with:byteslice-,1386

This library provides types that allow the user to talk about a slice of a ByteArray or a MutableByteArray. It also offers UnmanagedBytes, which is kind of like a slice into unmanaged memory. However, it is just an address and a length.


Revision history for byteslice – 2019-11-12

  • Add toLatinString.
  • Add stripPrefix, stripSuffix, stripOptionalPrefix, and stripOptionalSuffix.
  • Add takeWhileEnd and dropWhileEnd.
  • Add count.
  • Add an optimized split function.
  • Add splitInit.
  • Add splitFirst.
  • Add copy.
  • Add pin.
  • Add touch.
  • Add elem.
  • Add unsafeIndex. – 2019-09-15

  • Add isPrefixOf and isSuffixOf.
  • Add foldl, foldr, foldl', and foldr'. – 2019-08-21

  • Add Data.Bytes.Mutable module.
  • Add Data.Bytes module. – 2019-07-03

  • Add record labels for Bytes and MutableBytes
  • Add UnmanagedBytes. This is just an Addr and a length. – 2019-04-30

  • First version.
Used by 3 packages in nightly-2020-01-08(full list with versions):