// Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SRC_PUFFIN_STREAM_H_ #define SRC_PUFFIN_STREAM_H_ #include <list> #include <memory> #include <string> #include <utility> #include <vector> #include "puffin/src/include/puffin/common.h" #include "puffin/src/include/puffin/huffer.h" #include "puffin/src/include/puffin/puffer.h" #include "puffin/src/include/puffin/stream.h" namespace puffin { // A class for puffing a deflate stream and huffing into a deflate stream. The // puff stream is "imaginary", which means it doesn't really exists; It is build // and used on demand. This class uses a given deflate stream, and puffs the // deflate buffers in the stream as needed or vice versa. An object of this // class can be used for reading and writing puff data but should not be used // for both reading and writing using the same instance. In theory we can // separate this class into two classes, namely |PuffStream| and |HuffStream|, // but they are sharing a lot of codes which might be inconvenient and // unnecessary to do so. In this implementation, there is no protection against // reading and writing at the same time. class PuffinStream : public StreamInterface { … }; } // namespace puffin #endif // SRC_PUFFIN_STREAM_H_