58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: StreamPipeProcessor.hpp
|
|
Date: 2021-6-9
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO
|
|
{
|
|
struct IStreamReader;
|
|
struct IStreamWriter;
|
|
}
|
|
|
|
namespace Aurora::Compression
|
|
{
|
|
struct CompressionPipe
|
|
{
|
|
/// algorithm
|
|
|
|
/// LZMA decompression + compression, and ZSTD compression only
|
|
AuUInt32 threads {1};
|
|
|
|
/// consume from stream callback
|
|
AuSPtr<Aurora::IO::IStreamReader> inPipe;
|
|
|
|
/// write to stream callback
|
|
AuSPtr<Aurora::IO::IStreamWriter> writePipe;
|
|
|
|
/// preemption and reporting
|
|
AuFunction<bool(AuUInt, AuUInt)> reportProgress;
|
|
};
|
|
|
|
/**
|
|
* @deprecated legacy api / wont remove
|
|
*
|
|
* This API class is still viable for single-threaded utilities wishing to compress once
|
|
* Consider it a utility in addition to the main StreamProcessor class of APIs.
|
|
*
|
|
* It is still tested and supported as a non-muxable pipe operation w/o the overhead
|
|
* (and features of) the io subsystem.
|
|
*
|
|
*/
|
|
AUKN_SYM bool Decompress(const CompressionPipe &stream, const DecompressInfo &meta);
|
|
|
|
/**
|
|
* @deprecated legacy api / wont remove
|
|
*
|
|
* This API class is still viable for single-threaded utilities wishing to compress once
|
|
* Consider it a utility in addition to the main StreamProcessor class of APIs.
|
|
*
|
|
* It is still tested and supported as a non-muxable pipe operation w/o the overhead
|
|
* (and features of) the io subsystem.
|
|
*
|
|
*/
|
|
AUKN_SYM bool Compress(const CompressionPipe &stream, const CompressionInfo &info);
|
|
} |