Commit graph

13 commits

Author SHA1 Message Date
Baruch Even
2bdc5c476a Implement capn_write_fd 2014-08-07 17:56:51 +03:00
Baruch Even
440c662c66 Implement packed memory write
This uses the capn_deflate function.

The current use may get smaller packing than the maximum possible due to
the inability to peak around segments as it packs each segment on its
own. This saves time compared to copying everything into one place and
saves effort by not requiring to change the interface of capn_deflate to
support multiple different buffers.

It should be possible to make the capn_deflate state machine better to
handle the multiple buffers case too.
2014-08-06 22:29:51 +03:00
Baruch Even
0071546cd2 Add comments 2014-08-06 22:28:24 +03:00
Baruch Even
49483a6bbd Forego updating sz in capn_write_mem
It is not used and we already validated the total buffer size
beforehand.
2014-08-06 22:28:24 +03:00
Steve Dee
45b95c38d0 Add TODO and fail on packed writes 2014-02-21 13:23:57 -08:00
Steve Dee
ca03b34318 Implement serialization to buffers 2014-02-20 17:13:57 -08:00
James McKaskill
448021e7e1 use create_local 2013-09-12 14:42:30 -04:00
James McKaskill
2eb6628ae4 add support for default values 2013-05-12 00:59:47 -04:00
James McKaskill
85b7a99429 include the capn_segment as a header when allocating 2013-05-12 00:59:47 -04:00
James McKaskill
f99af86cb3 Move capn_init_* all into capn-malloc.c with a common create and free function 2013-05-08 22:35:52 -04:00
James McKaskill
b8da11676a Pass capn_ptr by value, better handling of tags 2013-05-07 22:44:21 -04:00
James McKaskill
3a235fe8c6 Add unit test for memory layout based off the Kenton's layout-test.c++ and whole slew of fixes to get the test to pass 2013-05-07 11:04:49 -04:00
James McKaskill
e0a5769d06 Add capn_init_malloc to provide a malloc based create function 2013-05-06 00:03:17 -04:00