writeable_node.h 575 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <cstddef>
  3. namespace NCompactTrie {
  4. class TNode;
  5. class TWriteableNode {
  6. public:
  7. const char* LeafPos;
  8. size_t LeafLength;
  9. size_t ForwardOffset;
  10. size_t LeftOffset;
  11. size_t RightOffset;
  12. char Label;
  13. TWriteableNode();
  14. TWriteableNode(const TNode& node, const char* data);
  15. // When you call this, the offsets should be relative to the end of the node. Use NPOS to indicate an absent offset.
  16. size_t Pack(char* buffer) const;
  17. size_t Measure() const;
  18. };
  19. }