darvid / python-hyperscan

🐍 A CPython extension for the Hyperscan regular expression matching library.
https://python-hyperscan.readthedocs.io/en/latest/
MIT License
165 stars 28 forks source link

Support for serialising/deserialising database #20

Closed halfdan closed 4 years ago

halfdan commented 4 years ago

Hyperscan allows serialising a database. It would be great if this library had support to serialise a database to disk and restore it at a later point.

https://intel.github.io/hyperscan/dev-reference/api_files.html#c.hs_serialize_database

darvid commented 4 years ago

so it doesn't look like I've documented this, but there are dumps and loads methods on the Database object.

darvid commented 4 years ago

documented as of v0.1.5, and renamed the functions to loadb/dumpb since they work with bytes and not strings.