2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: ICompressionStream.hpp
|
2021-09-06 10:58:08 +00:00
|
|
|
Date: 2021-7-14
|
2021-06-27 21:25:29 +00:00
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Compression
|
|
|
|
{
|
|
|
|
class ICompressionStream
|
|
|
|
{
|
|
|
|
public:
|
2021-09-13 21:13:41 +00:00
|
|
|
/// Ingest n bytes from the input stream assigned to the compression object
|
2021-09-06 15:47:35 +00:00
|
|
|
virtual AuStreamReadWrittenPair_t Ingest(AuUInt32 bytesFromUnprocessedInputSource) = 0;
|
|
|
|
|
2021-09-13 21:13:41 +00:00
|
|
|
/// Limited stream API
|
2021-09-06 15:47:35 +00:00
|
|
|
virtual bool ReadByProcessedN (void * /*opt*/, AuUInt32 minimumProcessed, AuStreamReadWrittenPair_t &pair, bool ingestUntilEOS = true) = 0;
|
2021-09-13 21:13:41 +00:00
|
|
|
|
|
|
|
/// Limited stream API
|
|
|
|
virtual bool ReadByProcessedN (void * /*opt*/, AuUInt32 minimumProcessed) = 0;
|
|
|
|
|
|
|
|
/// Limited stream API
|
2021-09-06 15:47:35 +00:00
|
|
|
virtual bool GoBackByProcessedN (AuUInt32 offset) = 0;
|
2021-09-13 21:13:41 +00:00
|
|
|
|
|
|
|
/// Limited stream API
|
2021-09-06 14:21:39 +00:00
|
|
|
virtual bool GoForwardByProcessedN(AuUInt32 offset) = 0;
|
2021-09-13 21:13:41 +00:00
|
|
|
|
|
|
|
/// Compression only
|
|
|
|
virtual void Flush() = 0;
|
2021-06-27 21:25:29 +00:00
|
|
|
};
|
|
|
|
}
|