planet-mitchell-0.0.0: Planet Mitchell

Safe HaskellSafe
LanguageHaskell2010

ByteString.Lazy

Contents

Synopsis

Documentation

Optics

bytes :: IsByteString t => IndexedTraversal' Int t Word8 #

Traverse each Word8 in a strict or lazy ByteString

This Traversal walks each strict ByteString chunk in a tree-like fashion enable zippers to seek to locations more quickly and accelerate many monoidal queries, but up to associativity (and constant factors) it is equivalent to the much slower:

bytesunpackedBytes . traversed
anyOf bytes (== 0x80) :: ByteString -> Bool

packedBytes :: IsByteString t => Iso' [Word8] t #

pack (or unpack) a list of bytes into a strict or lazy ByteString.

pack x ≡ x ^. packedBytes
unpack x ≡ x ^. from packedBytes
packedBytesfrom unpackedBytes