• 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_CONSTANTS_H_
6 #define _BSDIFF_CONSTANTS_H_
7 
8 #include <stdint.h>
9 
10 namespace bsdiff {
11 
12 enum class CompressorType : uint8_t {
13   kNoCompression = 0,
14   kBZ2 = 1,
15   kBrotli = 2,
16 };
17 
18 // The header of the upstream's "BSDIFF40" format using BZ2 as compressor.
19 constexpr uint8_t kLegacyMagicHeader[] = "BSDIFF40";
20 
21 // The header of the new BSDF2 format. This format supports both bz2 and
22 // brotli compressor.
23 constexpr uint8_t kBSDF2MagicHeader[] = "BSDF2";
24 
25 }  // namespace bsdiff
26 
27 #endif  // _BSDIFF_CONSTANTS_H_
28