Bitcoin Core 28.99.0
P2P Digital Currency
|
Compact serializer for scripts. More...
#include <compressor.h>
Public Member Functions | |
template<typename Stream > | |
void | Ser (Stream &s, const CScript &script) |
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 version for transactions, in which case this value becomes dependent on version 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 54 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 version for transactions, in which case this value becomes dependent on version and nHeight of the enclosing transaction.
Definition at line 62 of file compressor.h.