6#ifndef BITCOIN_COMPRESSOR_H
7#define BITCOIN_COMPRESSOR_H
17 const std::vector<uint8_t> &out);
49 template <
typename Stream>
51 std::vector<uint8_t> compr;
61 template <
typename Stream>
void Unser(Stream &s,
CScript &script) {
62 unsigned int nSize = 0;
83 template <
typename Stream,
typename I>
void Ser(Stream &s, I val) {
86 template <
typename Stream,
typename I>
void Unser(Stream &s, I &val) {
98 READWRITE(Using<AmountCompression>(obj.nValue),
99 Using<ScriptCompression>(obj.scriptPubKey));
Serialized script, used inside transaction inputs and outputs.
An output of a transaction.
A Span is an object that can refer to a contiguous sequence of objects.
void resize(size_type new_size)
uint64_t CompressAmount(Amount nAmount)
Compress amount.
Amount DecompressAmount(uint64_t nAmount)
bool DecompressScript(CScript &script, unsigned int nSize, const std::vector< uint8_t > &out)
unsigned int GetSpecialScriptSize(unsigned int nSize)
bool CompressScript(const CScript &script, std::vector< uint8_t > &out)
static const int MAX_SCRIPT_SIZE
void Unser(Stream &s, I &val)
void Ser(Stream &s, I val)
Compact serializer for scripts.
void Unser(Stream &s, CScript &script)
static const unsigned int nSpecialScripts
make this static for now (there are only 6 special scripts defined) this can potentially be extended ...
void Ser(Stream &s, const CScript &script) const
wrapper for CTxOut that provides a more compact serialization
FORMATTER_METHODS(CTxOut, obj)