func ToAPI(f gob.GobEncoder) (*api.BloomFilter, error) {
	encoded, err := f.GobEncode()
	if err != nil {
		return nil, err
	}
	return &api.BloomFilter{
		Encoded: encoded,
	}, nil
}
ToAPI converts a *bloom.BloomFilter (via narrower gob.GobEncoder) to an *api.BloomFilter.
package subscribe
import (
	"encoding/gob"
	"math/rand"
	"github.com/drausin/libri/libri/librarian/api"
	"github.com/willf/bloom"
)
var minFilterElements = 16