6 #ifndef BITCOIN_COMPRESSOR_H 7 #define BITCOIN_COMPRESSOR_H 52 bool Compress(std::vector<unsigned char> &
out)
const;
54 bool Decompress(
unsigned int nSize,
const std::vector<unsigned char> &
out);
59 std::vector<unsigned char> compr;
66 template<
typename Stream>
67 void Serialize(Stream &s,
int nType,
int nVersion)
const {
68 std::vector<unsigned char> compr;
78 template<
typename Stream>
80 unsigned int nSize = 0;
108 template <
typename Stream,
typename Operation>
109 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
110 if (!ser_action.ForRead()) {
123 #endif // BITCOIN_COMPRESSOR_H
bool Compress(std::vector< unsigned char > &out) const
void resize(size_type new_size)
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
bool IsToPubKey(CPubKey &pubkey) const
unsigned int GetSpecialSize(unsigned int nSize) const
bool IsToKeyID(CKeyID &hash) const
CTxOutCompressor(CTxOut &txoutIn)
bool Decompress(unsigned int nSize, const std::vector< unsigned char > &out)
static uint64_t CompressAmount(uint64_t nAmount)
CScriptCompressor(CScript &scriptIn)
static const unsigned int nSpecialScripts
static uint64_t DecompressAmount(uint64_t nAmount)
unsigned int GetSerializeSize(int nType, int nVersion) const
bool IsToScriptID(CScriptID &hash) const
void Serialize(Stream &s, int nType, int nVersion) const
void Unserialize(Stream &s, int nType, int nVersion)