byteme
C++ wrappers for buffered inputs
Loading...
Searching...
No Matches
byteme Namespace Reference

Simple byte readers and writers. More...

Classes

class  ChunkedBufferReader
 Read chunks of bytes from a raw buffer. More...
 
class  GzipFileReader
 Read uncompressed bytes from a Gzip-compressed file. More...
 
class  GzipFileWriter
 Write uncompressed bytes to a Gzip-compressed file. More...
 
class  IstreamReader
 Read bytes from a std::istream. More...
 
class  OstreamWriter
 Read bytes from a std::ostream. More...
 
class  PerByte
 Perform byte-by-byte extraction from a Reader source. More...
 
class  PerByteParallel
 Perform parallelized byte-by-byte extraction from a Reader source. More...
 
class  RawBufferReader
 Read bytes from a raw buffer, usually text. More...
 
class  RawBufferWriter
 Write bytes to a raw buffer. More...
 
class  RawFileReader
 Read bytes from a file, usually text. More...
 
class  RawFileWriter
 Write bytes to a file. More...
 
class  Reader
 Virtual class for reading bytes from a source. More...
 
class  SomeBufferReader
 Read a buffer that may or may not be Gzip/Zlib-compressed. More...
 
class  SomeFileReader
 Read a file that may or may not be Gzipped. More...
 
class  Writer
 Virtual class for writing bytes to a sink. More...
 
class  ZlibBufferReader
 Read and decompress bytes from a Zlib-compressed buffer. More...
 
class  ZlibBufferWriter
 Compress and write bytes to a Zlib-compressed buffer. More...
 

Functions

std::string temp_file_path (const std::string &prefix, const std::string &ext)
 
std::string temp_file_path (const std::string &prefix)
 

Detailed Description

Simple byte readers and writers.

Function Documentation

◆ temp_file_path() [1/2]

std::string byteme::temp_file_path ( const std::string & prefix)
inline
Parameters
prefixPrefix of the basename of the file.
Returns
Path to a new file without any extension, see temp_file_path() for more details.

◆ temp_file_path() [2/2]

std::string byteme::temp_file_path ( const std::string & prefix,
const std::string & ext )
inline
Parameters
prefixPrefix of the basename of the file.
extFile extension.
Returns
Path to a new file in an appropriate temporary directory with a unique name. The file itself is created at that location, though this may not be thread-safe.

This function is wholly intended for unit testing in byteme and downstream libraries. Production use should use OS-specific thread-safe alternatives such as mkstemp().