The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sereal - Fast, compact, powerful binary (de-)serialization

SYNOPSIS

  use Sereal qw(encode_sereal decode_sereal looks_like_sereal);
  

DESCRIPTION

This is an experimental module. Before using it in production, please get in touch with the authors!

Sereal is an efficient, compact-output, binary and feature-rich serialization protocol. The Perl encoder is implemented as the Sereal::Encoder module, the Perl decoder correspondingly as Sereal::Decoder. They are distributed separately to allow for safe upgrading without downtime. (Hint: Upgrade the decoder everywhere first, then the encoder.)

This Sereal module is a very thin wrapper around both Sereal::Encoder and Sereal::Decoder. It depends on both and loads both. So if you have a user of both encoder and decoder, it is enough to depend on a particular version of Sereal and you'll get the most recent released versions of Sereal::Encoder and Sereal::Decoder whose version is smaller than or equal to the version of Sereal you depend on.

The protocol specification and many other bits of documentation can be found in the github repository. Right now, the specification is at https://github.com/Sereal/Sereal/blob/master/sereal_spec.pod, there is a discussion of the design objectives in https://github.com/Sereal/Sereal/blob/master/README.pod, and the output of our benchmarks can be seen at https://github.com/Sereal/Sereal/wiki/Sereal-Comparison-Graphs.

EXPORTED FUNCTIONS

It is recommended to use the object-oriented interface of Sereal::Encoder and Sereal::Decoder if you care about performance.

You can optionally import three functions from Sereal. encode_sereal is the same function as Sereal::Encoder's encode_sereal function. decode_sereal and looks_like_sereal are the same as Sereal::Decoder's functions of the same names.

After loading the Sereal module, both Sereal::Encoder and Sereal::Decoder are guaranteed to be loaded, so you can use their object-oriented interface.

AUTHOR

Steffen Mueller <smueller@cpan.org>

ACKNOWLEDGMENT

This module was originally developed for Booking.com. With approval from Booking.com, this module was generalized and published on CPAN, for which the authors would like to express their gratitude.

COPYRIGHT AND LICENSE

Copyright (C) 2012, 2013 by Steffen Mueller