proxygen
CertificateCompressor.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <fizz/record/Types.h>
12 
13 namespace fizz {
15  public:
16  virtual ~CertificateCompressor() = default;
17  /*
18  * Return what algorithm this class encodes/decodes.
19  */
21 
22  /*
23  * Compress a given certificate message. Throws an exception if the
24  * compression fails.
25  */
26  virtual CompressedCertificate compress(const CertificateMsg&) = 0;
27 };
28 
30  public:
31  virtual ~CertificateDecompressor() = default;
32  /*
33  * Return what algorithm this class encodes/decodes.
34  */
36 
37  /*
38  * Decompress a given compressed certificate message. Throws an exception
39  * if decompression fails or if it fails parse the CertificateMessage.
40  */
41  virtual CertificateMsg decompress(const CompressedCertificate&) = 0;
42 };
43 } // namespace fizz
CertificateCompressionAlgorithm
Definition: Types.h:167
virtual CertificateCompressionAlgorithm getAlgorithm() const =0
virtual ~CertificateCompressor()=default
Definition: Actions.h:16
virtual CompressedCertificate compress(const CertificateMsg &)=0