Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
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
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
packedBytes
≡from
unpackedBytes
unpackedBytes :: IsByteString t => Iso' t [Word8] #
unpack
(or pack
) a ByteString
into a list of bytes
unpackedBytes
≡from
packedBytes
unpack
x ≡ x^.
unpackedBytes
pack
x ≡ x^.
from
unpackedBytes
unpackedBytes
::Iso'
ByteString
[Word8
]unpackedBytes
::Iso'
ByteString
[Word8
]