Om
1.0.0
A universal framework for multimedia simulation
|
A class that encodes a write-only stream of compressed data. More...
#include <omCompressedOutputStream.h>
Public Member Functions | |
CompressedOutputStream (DataOutputStream *newOutputStream) | |
Create a new compressed output stream that uses the specified data output stream as its destination. More... | |
CompressedOutputStream (DataOutputStream *newOutputStream, const CompressionSettings &settings) | |
Create a new compressed output stream that uses the specified data output stream as its destination. More... | |
~CompressedOutputStream () | |
Destroy an output stream and free all of its resources (close it). More... | |
Bool | start () |
Start compressing output data. More... | |
Bool | stop () |
Stop compressing output data, flush buffered data, and finish the compression stream. More... | |
virtual Size | writeData (const UByte *data, Size number) |
Write the specified number of bytes of data from the buffer to the stream. More... | |
virtual void | flush () |
Flush buffered data to the output stream and compress it. More... | |
void | restart () |
Flush buffered data to the output stream and restart the compression process. More... | |
virtual Bool | canSeek () const |
Return whether or not this type of stream allows seeking. More... | |
virtual Bool | canSeek (Int64 relativeOffset) const |
Return whether or not this stream can seek by the specified amount in bytes. More... | |
virtual Int64 | seek (Int64 relativeOffset) |
Move the current position in the stream by the specified relative signed offset in bytes. More... | |
virtual LargeIndex | getPosition () const |
Return the absolute position in bytes in the uncompressed stream of data. More... | |
LargeIndex | getCompressedPosition () const |
Return the current position in the compressed output data stream. More... | |
Public Member Functions inherited from om::io::DataOutputStream | |
virtual | ~DataOutputStream () |
Destroy an output stream and free all of its resources (close it). More... | |
Size | writeData (const data::Data &data) |
Write as much of the specified data array to the stream and return the number of bytes written. More... | |
Size | writeData (const data::DataBuffer &dataBuffer) |
Write as much of the specified data array to the stream and return the number of bytes written. More... | |
A class that encodes a write-only stream of compressed data.
om::compression::CompressedOutputStream::CompressedOutputStream | ( | DataOutputStream * | newOutputStream | ) |
Create a new compressed output stream that uses the specified data output stream as its destination.
The default compression settings are used.
om::compression::CompressedOutputStream::CompressedOutputStream | ( | DataOutputStream * | newOutputStream, |
const CompressionSettings & | settings | ||
) |
Create a new compressed output stream that uses the specified data output stream as its destination.
om::compression::CompressedOutputStream::~CompressedOutputStream | ( | ) |
Destroy an output stream and free all of its resources (close it).
Bool om::compression::CompressedOutputStream::start | ( | ) |
Start compressing output data.
Bool om::compression::CompressedOutputStream::stop | ( | ) |
Stop compressing output data, flush buffered data, and finish the compression stream.
|
virtual |
Write the specified number of bytes of data from the buffer to the stream.
Implements om::io::DataOutputStream.
|
virtual |
Flush buffered data to the output stream and compress it.
Implements om::io::DataOutputStream.
void om::compression::CompressedOutputStream::restart | ( | ) |
Flush buffered data to the output stream and restart the compression process.
This allows decompression to be restarted from the current compressed position. This can allow random access to block-compressed files.
|
virtual |
Return whether or not this type of stream allows seeking.
Implements om::io::DataOutputStream.
Return whether or not this stream can seek by the specified amount in bytes.
Implements om::io::DataOutputStream.
Move the current position in the stream by the specified relative signed offset in bytes.
Implements om::io::DataOutputStream.
|
virtual |
Return the absolute position in bytes in the uncompressed stream of data.
Implements om::io::DataOutputStream.
LargeIndex om::compression::CompressedOutputStream::getCompressedPosition | ( | ) | const |
Return the current position in the compressed output data stream.