Proposed changes: refactor Sereal::Decoder

35 views
Skip to first unread message

Ivan Kruglov

unread,
May 4, 2015, 6:24:53 PM5/4/15
to serea...@googlegroups.com
Hi Sereal Devs,

As part of Sereal::Path project [1] I did some work in refactoring
Sereal::Decoder and splitting out the code for easy-to-reuse purposes.

By this work (and more to come) I would like to introduce concepts of
sereal reader and writer objects and set of basic functions to work with
them.

Below is the list of new headers for reader:
srl_reader.h - useful macros (SRL_RDR_BUF_DONE, etc)
srl_reader_types.h - define struct srl_reader_buffer
srl_reader_decompress.h - decompress functions snappy/zlib
srl_reader_error.h - errors/tracing macros
srl_reader_varint.h - routines to read varints for different cases
srl_reader_misc.h

The code for writer is already almost fully split and requires just a
bit of renaming + relocating to be aligned with reader. I'm planning to
do this later.

The code is in kruglov/sereal_path branch.
The changes are mostly technical.

Please let me know if there are any suggestions.

[1] Sereal::Path for Sereal is what XPath for XML or JSON::Path for JSON.

--
Best regards,
Ivan Kruglov

signature.asc

Ivan Kruglov

unread,
May 9, 2015, 10:15:27 AM5/9/15
to serea...@googlegroups.com
Hello,

I've merged and pushed the changes. Note, that srl_error.h file was
deleted from shared directory. Its local link will become broken once
you pull.

Ivan.
signature.asc
Reply all
Reply to author
Forward
0 new messages