| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
ByteString.Lazy
Contents
Synopsis
- module Data.ByteString.Lazy
- bytes :: IsByteString t => IndexedTraversal' Int t Word8
- packedBytes :: IsByteString t => Iso' [Word8] t
- unpackedBytes :: IsByteString t => Iso' t [Word8]
Documentation
module Data.ByteString.Lazy
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:
bytes≡unpackedBytes.traversed
anyOfbytes(==0x80) ::ByteString->Bool
packedBytes :: IsByteString t => Iso' [Word8] t #
pack (or unpack) a list of bytes into a strict or lazy ByteString.
packx ≡ x^.packedBytesunpackx ≡ x^.frompackedBytespackedBytes≡fromunpackedBytes
unpackedBytes :: IsByteString t => Iso' t [Word8] #
unpack (or pack) a ByteString into a list of bytes
unpackedBytes≡frompackedBytesunpackx ≡ x^.unpackedBytespackx ≡ x^.fromunpackedBytes
unpackedBytes::Iso'ByteString[Word8]unpackedBytes::Iso'ByteString[Word8]