summaryrefslogtreecommitdiff
path: root/brotli_compressor.h
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-03-06 11:42:45 -0800
committerTianjie Xu <xunchang@google.com>2018-03-07 11:15:38 -0800
commit32b1f213383cc1e471dd3d14ed333fa7a2ed4e10 (patch)
tree645bd01a41bb4ffde34328aac3456ee1429f22f1 /brotli_compressor.h
parenta31cf35116698419bb75377b8c073a3f60b7f961 (diff)
downloadbsdiff-32b1f213383cc1e471dd3d14ed333fa7a2ed4e10.tar.gz
Modify the patch writer to use a list of compressors for each stream
Switch the internal member of the patch writer from a single compressor to a list of compressors for ctrl|diff|extra streams. The change doesn't affect the functionality of the existing bz2|brotli compressors; but later allow us to try all the compressors and select the one with the best compression ratio. With this new writer, callers will be able to produce the smallest patch without calling bsdiff explictly multiple times. Test: unit tests pass Change-Id: I441ae6636e2299b2cfc9d14f50952c85585dbb4f
Diffstat (limited to 'brotli_compressor.h')
-rw-r--r--brotli_compressor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/brotli_compressor.h b/brotli_compressor.h
index 19cbb88..153d932 100644
--- a/brotli_compressor.h
+++ b/brotli_compressor.h
@@ -30,7 +30,7 @@ class BrotliCompressor : public CompressorInterface {
bool Write(const uint8_t* buf, size_t size) override;
bool Finish() override;
const std::vector<uint8_t>& GetCompressedData() override;
- CompressorType Type() override { return CompressorType::kBrotli; }
+ CompressorType Type() const override { return CompressorType::kBrotli; }
private:
BrotliEncoderState* brotli_encoder_state_;