FastFilter / xor_singleheader

Header-only binary fuse and xor filter library
Apache License 2.0
348 stars 32 forks source link

Cross language serialization support #42

Open patelprateek opened 2 years ago

patelprateek commented 2 years ago

Very interesting work. I have some production use case where i want to use filters in different systems , is there any support for serialization of these filters or any serialization spec ? Any implementations you would be aware of will be helpful

lemire commented 2 years ago

If you'd like to propose a format specification, please do so.

lemire commented 8 months ago

We now have serialization as part of the library:

  size_t buffer_size = binary_fuse16_serialization_bytes(&filter);
  char *buffer = (char*)malloc(buffer_size);
  binary_fuse16_serialize(&filter, buffer);
  binary_fuse16_free(&filter);
  binary_fuse16_deserialize(&filter, buffer);
  free(buffer);