CLVM compression was designed for straightforward implementation within CLVM itself. To understand how it works, we'll first examine the standard deserialization algorithm implemented in CLVM. See also here https://github.com/Chia-Network/clvm_rs/blob/7e58298b85aed07672678e54b9f28571724814dd/cl/deserialize_w_backrefs.cl
A CLVM stack is a nil-terminated list of CLVM objects. Stack operations push and pop from the front:
- Push operation:
(c new_object old_stack)
- Pop operation:
(f stack)
returns topmost object