Header flag to indicate that constant segregation should be applied.
Default header with constant segregation enabled.
Default value of ErgoTree.header byte
Header flag to indicate that whole size of ErgoTree should be saved before tree content.
Current version of ErgoTree serialization format (aka bite-code language version)
Header mask to extract version bits.
Build ErgoTree via serialization of the value with ConstantSegregationHeader, constants segregated from the tree and ConstantPlaceholders referring to the segregated constants.
Build ErgoTree via serialization of the value with ConstantSegregationHeader, constants segregated from the tree and ConstantPlaceholders referring to the segregated constants.
This method uses single traverse of the tree to:
1) find and segregate all constants;
2) replace constants with ConstantPlaceholders in the tree
;
3) write the tree
to the Writer's buffer obtaining treeBytes
;
4) deserialize tree
with ConstantPlaceholders.