 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
6 #ifndef BITCOIN_COMPRESSOR_H
7 #define BITCOIN_COMPRESSOR_H
53 bool Compress(std::vector<unsigned char>& out)
const;
55 bool Decompress(
unsigned int nSize,
const std::vector<unsigned char>& out);
62 std::vector<unsigned char> compr;
69 template <
typename Stream>
70 void Serialize(Stream& s,
int nType,
int nVersion)
const
72 std::vector<unsigned char> compr;
82 template <
typename Stream>
85 unsigned int nSize = 0;
94 if (nSize > MAX_SCRIPT_SIZE) {
119 template <
typename Stream,
typename Operation>
122 if (!ser_action.ForRead()) {
135 #endif // BITCOIN_COMPRESSOR_H
bool IsToKeyID(CKeyID &hash) const
These check for scripts for which a special case with a shorter encoding is defined.
unsigned int GetSpecialSize(unsigned int nSize) const
bool IsToPubKey(CPubKey &pubkey) const
CTxOutCompressor(CTxOut &txoutIn)
static uint64_t CompressAmount(uint64_t nAmount)
A reference to a CKey: the Hash160 of its serialized public key.
CScriptCompressor(CScript &scriptIn)
An output of a transaction.
bool IsToScriptID(CScriptID &hash) const
Wrapper for serializing arrays and POD.
unsigned int GetSerializeSize(int nType, int nVersion) const
Serialized script, used inside transaction inputs and outputs.
wrapper for CTxOut that provides a more compact serialization
bool Compress(std::vector< unsigned char > &out) const
void resize(size_type new_size)
An encapsulated public key.
Compact serializer for scripts.
void Unserialize(Stream &s, int nType, int nVersion)
bool Decompress(unsigned int nSize, const std::vector< unsigned char > &out)
static const unsigned int nSpecialScripts
make this static for now (there are only 6 special scripts defined) this can potentially be extended ...
T & REF(const T &val)
Used to bypass the rule against non-const reference to temporary where it makes sense with wrappers s...
A reference to a CScript: the Hash160 of its serialization (see script.h)
void Serialize(Stream &s, int nType, int nVersion) const
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
static uint64_t DecompressAmount(uint64_t nAmount)