byteme
Read/write bytes from various sources
Loading...
Searching...
No Matches
byteme Namespace Reference

Simple byte readers and writers. More...

Classes

class  BufferedReader
 Buffered wrapper around a Reader. More...
 
class  BufferedWriter
 Buffered wrapper around a Writer. More...
 
class  GzipFileReader
 Read uncompressed bytes from a Gzip-compressed file. More...
 
struct  GzipFileReaderOptions
 Options for GzipFileReader construction. More...
 
class  GzipFileWriter
 Write uncompressed bytes to a Gzip-compressed file. More...
 
struct  GzipFileWriterOptions
 Options for GzipFileWriter construction. More...
 
class  IstreamReader
 Read bytes from a std::istream. More...
 
class  OstreamWriter
 Read bytes from a std::ostream. More...
 
class  ParallelBufferedReader
 Parallelized buffering to wrap a Reader. More...
 
class  ParallelBufferedWriter
 Parallelized buffering to wrap a Writer. More...
 
class  RawBufferReader
 Read bytes from a raw buffer, usually text. More...
 
class  RawBufferWriter
 Write bytes to a raw buffer. More...
 
struct  RawBufferWriterOptions
 Options for the RawBufferWriter constructor. More...
 
class  RawFileReader
 Read bytes from a file, usually text. More...
 
struct  RawFileReaderOptions
 Options for the RawFileReader constructor. More...
 
class  RawFileWriter
 Write bytes to a file. More...
 
struct  RawFileWriterOptions
 Options for the RawFileWriter constructor. More...
 
class  Reader
 Virtual class for reading bytes from a source. More...
 
class  SerialBufferedReader
 Serial buffering to wrap a Reader. More...
 
class  SerialBufferedWriter
 Serial buffering to wrap a Writer. More...
 
class  Writer
 Virtual class for writing bytes to a sink. More...
 
class  ZlibBufferReader
 Read and decompress bytes from a Zlib-compressed buffer. More...
 
struct  ZlibBufferReaderOptions
 Options for the ZlibBufferReader constructor. More...
 
class  ZlibBufferWriter
 Compress and write bytes to a Zlib-compressed buffer. More...
 
struct  ZlibBufferWriterOptions
 Options for the ZlibBufferWriter constructor. More...
 

Enumerations

enum class  ZlibCompressionMode : char { DEFLATE , ZLIB , GZIP }
 

Functions

bool is_zlib (const unsigned char *buffer, std::size_t n)
 
bool is_gzip (const unsigned char *buffer, std::size_t n)
 
bool is_zlib_or_gzip (const unsigned char *buffer, std::size_t n)
 
bool is_gzip (const char *path)
 

Detailed Description

Simple byte readers and writers.

Enumeration Type Documentation

◆ ZlibCompressionMode

enum class byteme::ZlibCompressionMode : char
strong

Compression mode for Zlib. DEFLATE is the underlying compression algorithm, while ZLIB and GZIP are formats that use DEFLATE internally with some extra wrappers.

Function Documentation

◆ is_gzip() [1/2]

bool byteme::is_gzip ( const char * path)
inline
Parameters
pathPath to a file.
Returns
Whether the file is Gzipped, based on its magic numbers.

◆ is_gzip() [2/2]

bool byteme::is_gzip ( const unsigned char * buffer,
std::size_t n )
inline
Parameters
[in]bufferPointer to an array of length n.
nNumber of bytes in buffer.
Returns
Whether the buffer is Gzip-compressed, based on its magic numbers.

◆ is_zlib()

bool byteme::is_zlib ( const unsigned char * buffer,
std::size_t n )
inline
Parameters
[in]bufferPointer to an array of length n.
nNumber of bytes in buffer.
Returns
Whether the buffer is Zlib-compressed, based on its magic numbers.

◆ is_zlib_or_gzip()

bool byteme::is_zlib_or_gzip ( const unsigned char * buffer,
std::size_t n )
inline
Parameters
[in]bufferPointer to an array of length n.
nNumber of bytes in buffer.
Returns
Whether the buffer is Gzip- or Zlib-compressed, based on its magic numbers.