cereal-vector-0.1.0.0: Serialize instances for Data.Vector types.

Safe HaskellSafe-Infered

Data.Vector.Serialize

Description

Serialize functions for Vector vectors. Orphan instances are provided for Vector and Primitive vectors.

Instances are not provided for Unbox vectors, as they must be declared on an individual basis for each type the vectors may contain. The genericGet and genericPut functions should still work for these vectors without declaring instances.

The serialized format is an Int64 representing the length of the Vector, followed by the serialized contents of each element.

Note that the instances specialized for Storable are much more performant for storable vectors.

Synopsis

Documentation

genericGetVector :: (Serialize a, Vector v a) => Get (v a)Source

Read a Vector.

genericPutVector :: (Serialize a, Vector v a) => Putter (v a)Source

Write a Vector.