33 lines
1.0 KiB
C++
33 lines
1.0 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ICompressionStream.hpp
|
|
Date: 2021-7-14
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Compression
|
|
{
|
|
class ICompressionStream
|
|
{
|
|
public:
|
|
/// Ingest n bytes from the input stream assigned to the compression object
|
|
virtual AuStreamReadWrittenPair_t Ingest(AuUInt32 bytesFromUnprocessedInputSource) = 0;
|
|
|
|
/// Limited stream API
|
|
virtual bool ReadByProcessedN (void * /*opt*/, AuUInt32 minimumProcessed, AuStreamReadWrittenPair_t &pair, bool ingestUntilEOS = true) = 0;
|
|
|
|
/// Limited stream API
|
|
virtual bool ReadByProcessedN (void * /*opt*/, AuUInt32 minimumProcessed) = 0;
|
|
|
|
/// Limited stream API
|
|
virtual bool GoBackByProcessedN (AuUInt32 offset) = 0;
|
|
|
|
/// Limited stream API
|
|
virtual bool GoForwardByProcessedN(AuUInt32 offset) = 0;
|
|
|
|
/// Compression only
|
|
virtual void Flush() = 0;
|
|
};
|
|
} |