Skip to content

Export the filter #17

@RoyBellingan

Description

@RoyBellingan

First of all nice and well designed library!

I am looking to add a export() method.
From my test looks like is enough to just move

bits_.data()
and
num_bits_

For this "test" I have just moved as public
bitvector bits_;
and
size_type num_bits_;
std::vector<block_type> bits_;

If is ok I will prepare a patch to add serialize / unserialize function.
They will be something like

std::string serialize();

bool unserialize(std::string raw)

The result "string" will be nothing more than sizeof(size_type) byte for the num_bits_ and all the remaining the content of bits_.data().

Eventually a checksum can be added, there is no need to have a base64 version, I don't think someone is going to copy paste a filter.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions