base.pxd 471 B

1234567891011121314151617181920
  1. cimport lakesuperior.cy_include.cytpl as tpl
  2. ctypedef tpl.tpl_bin Buffer
  3. # NOTE This may change in the future, e.g. if a different key size is to
  4. # be forced.
  5. ctypedef size_t KeyIdx
  6. ctypedef KeyIdx Key[1]
  7. ctypedef KeyIdx DoubleKey[2]
  8. ctypedef KeyIdx TripleKey[3]
  9. ctypedef KeyIdx QuadKey[4]
  10. cdef enum:
  11. KLEN = sizeof(KeyIdx)
  12. DBL_KLEN = 2 * sizeof(KeyIdx)
  13. TRP_KLEN = 3 * sizeof(KeyIdx)
  14. QUAD_KLEN = 4 * sizeof(KeyIdx)
  15. cdef bytes buffer_dump(Buffer* buf)