License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell98 |
Access to lower primitive that allow to use Packing and Unpacking, on mmap type of memory. Potentially unsafe, as it can't check if any of value passed are valid.
- runPackingAt :: Ptr Word8 -> Int -> Packing a -> IO (a, Int)
- runUnpackingAt :: ForeignPtr Word8 -> Int -> Int -> Unpacking a -> IO a
Documentation
:: Ptr Word8 | Pointer to the beginning of the memory |
-> Int | Size of the memory |
-> Packing a | Packing action |
-> IO (a, Int) | Number of bytes filled |
Run packing on an arbitrary buffer with a size.
This is available, for example to run on mmap typed memory, and this is highly unsafe, as the user need to make sure the pointer and size passed to this function are correct.
:: ForeignPtr Word8 | The initial block of memory |
-> Int | Starting offset in the block of memory |
-> Int | Size |
-> Unpacking a | Unpacking action |
-> IO a |
Run unpacking on an arbitrary buffer with a size.
This is available, for example to run on mmap typed memory, and this is highly unsafe, as the user need to make sure the pointer and size passed to this function are correct.