7 #ifndef PIVX_COMPRESSOR_H
8 #define PIVX_COMPRESSOR_H
43 template<
typename Stream>
45 std::vector<unsigned char> compr;
55 template<
typename Stream>
57 unsigned int nSize = 0;
66 if (nSize > MAX_SCRIPT_SIZE) {
79 template<
typename Stream,
typename I>
void Ser(Stream& s, I val)
83 template<
typename Stream,
typename I>
void Unser(Stream& s, I& val)
Serialized script, used inside transaction inputs and outputs.
An output of a transaction.
void resize(size_type new_size)
uint64_t DecompressAmount(uint64_t nAmount)
bool DecompressScript(CScript &script, unsigned int nSize, const std::vector< unsigned char > &out)
bool CompressScript(const CScript &script, std::vector< unsigned char > &out)
uint64_t CompressAmount(uint64_t nAmount)
unsigned int GetSpecialScriptSize(unsigned int nSize)
constexpr Span< A > MakeSpan(A(&a)[N])
MakeSpan for arrays:
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)
wrapper for CTxOut that provides a more compact serialization
FORMATTER_METHODS(CTxOut, obj)