• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef _BSDIFF_BZ2_DECOMPRESSOR_H_
6 #define _BSDIFF_BZ2_DECOMPRESSOR_H_
7 
8 #include <bzlib.h>
9 
10 #include "bsdiff/decompressor_interface.h"
11 
12 namespace bsdiff {
13 
14 class BZ2Decompressor : public DecompressorInterface {
15  public:
16   BZ2Decompressor() = default;
17 
18   bool SetInputData(const uint8_t* input_data, size_t size) override;
19 
20   bool Read(uint8_t* output_data, size_t bytes_to_output) override;
21 
22   bool Close() override;
23 
24  private:
25   bz_stream stream_;
26 };
27 
28 }  // namespace bsdiff
29 
30 #endif
31