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.
a value of the version bits from the given header byte.
true if the size flag is set to 1 in the given header byte.
Creates valid header byte with the given version.
Creates valid header byte with the given version. The SizeFlag is set if version > 0
true if the constant segregation flag is set to 1 in the given header byte.
Update the version bits of the given header byte with the given version value.
Update the version bits of the given header byte with the given version value.
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.
(Since version ) see corresponding Javadoc for more information.