#include <rld-compression.h>
|
| compressor (files::image &image, size_t size, bool out=true, bool compress=true) |
|
| ~compressor () |
|
void | write (const void *data, size_t length) |
|
void | write (files::image &input, off_t offset, size_t length) |
|
void | flush () |
|
size_t | read (void *data, size_t length) |
|
size_t | read (files::image &output_, off_t offset, size_t length) |
|
size_t | read (files::image &output_, size_t length) |
|
size_t | transferred () const |
|
size_t | compressed () const |
|
off_t | offset () const |
|
rld::compress::compressor::compressor |
( |
files::image & |
image, |
|
|
size_t |
size, |
|
|
bool |
out = true , |
|
|
bool |
compress = true |
|
) |
| |
Construct the compressor for the given image.
- Parameters
-
image | The image to read or write to. |
size | The size of the input and output buffers. |
out | The compressor is compressing. |
compress | Set to false to disable compression. |
rld::compress::compressor::~compressor |
( |
| ) |
|
size_t rld::compress::compressor::compressed |
( |
| ) |
const |
The amount of compressed data transferred.
- Returns
- size_t The amount of compressed data tranferred.
void rld::compress::compressor::flush |
( |
| ) |
|
Flush the output buffer is data is present.
off_t rld::compress::compressor::offset |
( |
| ) |
const |
The current offset in the stream.
- Returns
- off_t The current uncompressed offset.
size_t rld::compress::compressor::read |
( |
void * |
data, |
|
|
size_t |
length |
|
) |
| |
Read the compressed data into the input buffer and return the section requested.
- Parameters
-
data | Write the decompressed data here. |
length | The mount of data in bytes to read. |
- Returns
- size_t The amount of data read.
size_t rld::compress::compressor::read |
( |
files::image & |
output_, |
|
|
off_t |
offset, |
|
|
size_t |
length |
|
) |
| |
Read the decompressed data writing it to the image.
- Parameters
-
output_ | The output image. |
offset | The output image offset to write from. |
length | The mount of data in bytes to read. |
- Returns
- size_t The amount of data read.
size_t rld::compress::compressor::read |
( |
files::image & |
output_, |
|
|
size_t |
length |
|
) |
| |
Read the decompressed data writing it to the image.
- Parameters
-
output_ | The output image. |
length | The mount of data in bytes to read. |
- Returns
- size_t The amount of data read.
size_t rld::compress::compressor::transferred |
( |
| ) |
const |
The amount of uncompressed data transferred.
- Returns
- size_t The amount of data tranferred.
void rld::compress::compressor::write |
( |
const void * |
data, |
|
|
size_t |
length |
|
) |
| |
Write the data to the output buffer and once the image buffer is full compress and write the compressed data to the image.
- Parameters
-
data | The data to write to the image compressed |
length | The mount of data in bytes to write. |
void rld::compress::compressor::write |
( |
files::image & |
input, |
|
|
off_t |
offset, |
|
|
size_t |
length |
|
) |
| |
Write the section of the input image file to the output buffer and once the image buffer is full compress and write the compressed data to the image.
- Parameters
-
input | The input image. |
offset | The input image offset to read from. |
length | The mount of data in bytes to write. |
The documentation for this class was generated from the following files: