summaryrefslogtreecommitdiff
path: root/src/zstream.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4450 from libgit2/ethomson/odb_loose_readstreamEdward Thomson2018-02-081-0/+6
|\ | | | | Streaming read support for the loose ODB backend
| * zstream: introduce a single chunk readerEdward Thomson2018-02-011-0/+6
| | | | | | | | | | | | | | Introduce `get_output_chunk` that will inflate/deflate all the available input buffer into the output buffer. `get_output` will call `get_output_chunk` in a loop, while other consumers can use it to inflate only a piece of the data.
* | consistent header guardsethomson/header_guardsEdward Thomson2018-02-011-1/+1
|/ | | | use consistent names for the #include / #define header guard pattern.
* Make sure to always include "common.h" firstPatrick Steinhardt2017-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
* zstream: offer inflating, `git_zstream_inflatebuf`Edward Thomson2016-05-261-1/+8
| | | | Introduce `git_zstream_inflatebuf` for simple uses.
* Reorganize zstream API and fix wrap problemsRussell Belfer2014-01-301-4/+17
| | | | | | | | 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.
* Packbuilder contains its own zstreamEdward Thomson2014-01-141-0/+1
|
* Refactor zlib for easier deflate streamingEdward Thomson2014-01-141-0/+25