packer-0.1.1: Fast byte serializer and unserializer

Portabilityunknown
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellNone

Data.Packer.Unsafe

Description

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.

Synopsis

Documentation

runPackingAtSource

Arguments

:: Ptr Word8

Pointer to the beginning of the memory

-> Int

Size of the memory

-> Packing ()

Packing action

-> IO 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.

runUnpackingAtSource

Arguments

:: 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.