Crashpad
Public Types | Public Member Functions | List of all members
crashpad::Base94OutputStream Class Reference

This class implements Base94 encoding/decoding, it uses all printable characters except space for encoding, and no padding is required. More...

#include "util/stream/base94_output_stream.h"

Inheritance diagram for crashpad::Base94OutputStream:

Public Types

enum  Mode : bool
 Whether this object is configured to encode or decode data. More...
 

Public Member Functions

 Base94OutputStream (Mode mode, std::unique_ptr< OutputStreamInterface > output_stream)
 
bool Write (const uint8_t *data, size_t size) override
 
bool Flush () override
 

Detailed Description

This class implements Base94 encoding/decoding, it uses all printable characters except space for encoding, and no padding is required.

This implementation uses two base94 symbols to encoding 13 or 14 bit data, To maximize encoding efficiency, 14-bit data is encoded into two base94 symbols if its low 13-bit is less than 644 ( = 94^2 - 2^13), otherwise 13-bit data is encoded.

Member Enumeration Documentation

◆ Mode

Whether this object is configured to encode or decode data.

Enumerator
kEncode 

Data passed through this object is encoded.

kDecode 

Data passed through this object is decoded.

Constructor & Destructor Documentation

◆ Base94OutputStream()

crashpad::Base94OutputStream::Base94OutputStream ( Mode  mode,
std::unique_ptr< OutputStreamInterface >  output_stream 
)
Parameters
[in]modeThe work mode of this object.
[in]output_streamThe output_stream that this object writes to.

The documentation for this class was generated from the following files: