view package:memory
create a view on a given bytearray
This function update the offset and the size in order to guarantee:
- offset >= 0
- size >= 0
- offset < length
- size =< length - offset
a view on a given bytes
Equality test in constant time
A simple abstraction to a piece of memory.
Do beware that garbage collection related to piece of memory could be
triggered before this is used.
Only use with the appropriate handler has been used (e.g.
withForeignPtr on ForeignPtr)
create a view from the given byte array starting after having dropped
the fist n bytes
create a view from the given bytearray