Bitcoin ABC 0.30.5
P2P Digital Currency
|
Compact serializer for scripts. More...
#include <compressor.h>
Public Member Functions | |
template<typename Stream > | |
void | Ser (Stream &s, const CScript &script) const |
template<typename Stream > | |
void | Unser (Stream &s, CScript &script) |
Static Public Attributes | |
static const unsigned int | nSpecialScripts = 6 |
make this static for now (there are only 6 special scripts defined) this can potentially be extended together with a new nVersion for transactions, in which case this value becomes dependent on nVersion and nHeight of the enclosing transaction. More... | |
Compact serializer for scripts.
It detects common cases and encodes them much more efficiently. 3 special cases are defined:
Other scripts up to 121 bytes require 1 byte + script length. Above that, scripts up to 16505 bytes require 2 bytes + script length.
Definition at line 40 of file compressor.h.
|
inline |
|
inline |
|
static |
make this static for now (there are only 6 special scripts defined) this can potentially be extended together with a new nVersion for transactions, in which case this value becomes dependent on nVersion and nHeight of the enclosing transaction.
Definition at line 47 of file compressor.h.