A slice of a MutableByteArray.
Modulebyteslice-0.2.13.2Haskell2010
Data.Bytes.Mutable
If you are interested in sub-arrays of MutableByteArrays (e.g. writing quicksort), it would be grossly inefficient to make a copy of the sub-array. On the other hand, it'd be really annoying to track limit indices by hand.
This module defines the MutableBytes type which exposes a standard array
interface for a sub-arrays without copying and without manual index
manipulation. For immutable arrays, see Data.Bytes.
- 1 type
- 5 values
- Packagebyteslice-0.2.13.2
- Exports6
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceMutable.hs
Types
1 declarationFiltering
2 declarationsTake bytes while the predicate is true, aliasing the argument array.
Drop bytes while the predicate is true, aliasing the argument array.
Unsafe Slicing
2 declarationsTake the first n bytes from the argument, aliasing it.
Drop the first n bytes from the argument, aliasing it.
The new length will be len - n.
Conversion
1 declarationCreate a slice of MutableBytes that spans the entire argument array. This aliases the argument.