src/zstream.c


Log

Author Commit Date CI Message
Edward Thomson 4aa664ae 2015-02-10T23:55:07 git_buf_grow_by: increase buf asize incrementally Introduce `git_buf_grow_by` to incrementally increase the size of a `git_buf`, performing an overflow calculation on the growth.
Edward Thomson 392702ee 2015-02-09T23:41:13 allocations: test for overflow of requested size Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Carlos Martín Nieto c7f86efb 2014-04-26T18:04:43 zstream: grow based on used memory rather than allocated When deflating data, we might need to grow the buffer. Currently we add a guess on top of the currently-allocated buffer size. When we re-use the buffer, it already has some memory allocated; adding to that means that we always grow the buffer regardless of how much we need to use. Instead, increase on top of the currently-used size. This still leaves us with the allocated size of the largest object we compress, but it's a minor pain compared to unbounded growth. This fixes #2285.
Russell Belfer 19459b1e 2014-01-30T10:23:35 Defer zstream NUL termination to end And don't terminate if there isn't space for it (since it's binary data, it's not worth a reallocation).
Russell Belfer 8606f33b 2014-01-30T09:59:15 Expand zstream tests and fix off-by-one error
Russell Belfer d9b04d78 2014-01-29T15:02:35 Reorganize zstream API and fix wrap problems There were some confusing issues mixing up the number of bytes written to the zstream output buffer with the number of bytes consumed from the zstream input. This reorganizes the zstream API and makes it easier to deflate an arbitrarily large input while still using a fixed size output.
XTao 1cb5a811 2014-01-26T17:07:39 Fix write_object.
Edward Thomson 52a8a130 2014-01-06T16:41:12 Packbuilder contains its own zstream
Edward Thomson c6f26b48 2013-12-13T18:26:46 Refactor zlib for easier deflate streaming