![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
Namespaces | |
namespace | detail |
Data Structures | |
class | Buffer |
class | BufferWorkQueue |
Work queue for Buffer s that knows the total number of bytes in the queue. More... | |
class | ErrorHolder |
class | Logger |
struct | Options |
class | Range |
class | ResourcePool |
class | ScopeGuard |
class | SharedState |
class | SkippableFrame |
class | ThreadPool |
A simple thread pool that pulls tasks off its queue in FIFO order. More... | |
class | WorkQueue |
Unbounded thread-safe work queue. More... | |
Typedefs | |
typedef struct ::stat | file_status |
using | ByteRange = Range<const unsigned char*> |
using | MutableByteRange = Range<unsigned char*> |
using | StringPiece = Range<const char*> |
Variables | |
constexpr int | kLogError = 1 |
constexpr int | kLogInfo = 2 |
constexpr int | kLogDebug = 3 |
constexpr int | kLogVerbose = 4 |
A subset of folly/Range.h
. All code copied verbatim modulo formatting
typedef struct::stat file_status |
typedef Range< unsigned char * > MutableByteRange = Range<unsigned char*> |
typedef Range< const char * > StringPiece = Range<const char*> |
void advance | ( | Buffer & | buffer, |
ZSTD_inBuffer & | inBuffer ) |
Advance buffer
and inBuffer
by the amount of data read, as indicated by inBuffer.pos
.
std::uint64_t asyncCompressChunks | ( | SharedState & | state, |
WorkQueue< std::shared_ptr< BufferWorkQueue > > & | chunks, | ||
ThreadPool & | executor, | ||
FILE * | fd, | ||
std::uintmax_t | size, | ||
size_t | numThreads, | ||
ZSTD_parameters | params ) |
std::uint64_t asyncCompressChunks | ( | SharedState & | state, |
WorkQueue< std::shared_ptr< BufferWorkQueue > > & | chunks, | ||
ThreadPool & | executor, | ||
FILE * | fd, | ||
std::uintmax_t | size, | ||
std::size_t | numThreads, | ||
ZSTD_parameters | parameters ) |
Streams input from fd
, breaks input up into chunks, and compresses each chunk independently. Output of each chunk gets streamed to a queue, and the output queues get put into chunks
in order.
state | The shared state |
chunks | Each compression jobs output queue gets pushed() here as soon as it is available |
executor | The thread pool to run compression jobs in |
fd | The input file descriptor |
size | The size of the input file if known, 0 otherwise |
numThreads | The number of threads in the thread pool |
parameters | The zstd parameters to use for compression |
std::uint64_t asyncDecompressFrames | ( | SharedState & | state, |
WorkQueue< std::shared_ptr< BufferWorkQueue > > & | frames, | ||
ThreadPool & | executor, | ||
FILE * | fd ) |
Streams input from fd
. If pzstd headers are available it breaks the input up into independent frames. It sends each frame to an independent decompression job. Output of each frame gets streamed to a queue, and the output queues get put into frames
in order.
state | The shared state |
frames | Each decompression jobs output queue gets pushed() here as soon as it is available |
executor | The thread pool to run compression jobs in |
fd | The input file descriptor |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
ScopeGuard< Function > makeScopeGuard | ( | Function && | function | ) |
Creates a scope guard from function
.
Runs pzstd with options
and returns the number of bytes written. An error occurred if errorHandler.hasError()
.
options | The pzstd options to use for (de)compression |
Buffer split | ( | Buffer & | buffer, |
ZSTD_outBuffer & | outBuffer ) |
Split buffer
and advance outBuffer
by the amount of data written, as indicated by outBuffer.pos
.
|
inlinenoexcept |
std::uint64_t writeFile | ( | SharedState & | state, |
WorkQueue< std::shared_ptr< BufferWorkQueue > > & | outs, | ||
FILE * | outputFd, | ||
bool | decompress ) |
Streams input in from each queue in outs
in order, and writes the data to outputFd
.
state | The shared state |
outs | A queue of output queues, one for each (de)compression job. |
outputFd | The file descriptor to write to |
decompress | Are we decompressing? |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |