Skip to content
This repository has been archived by the owner on Sep 23, 2018. It is now read-only.

Commit

Permalink
add encoding/gob support
Browse files Browse the repository at this point in the history
Signed-off-by: Barry Allard <[email protected]>
  • Loading branch information
skull-squadron committed Dec 27, 2015
1 parent b9ee2d1 commit 807a47e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gob.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package bloomfilter

import _ "encoding/gob"

// conforms to interface gob.GobDecoder
func (f *Filter) GobDecode(data []byte) error {
return f.UnmarshalBinary(data)
}

// conforms to interface gob.GobEncoder
func (f *Filter) GobEncode() ([]byte, error) {
return f.MarshalBinary()
}

0 comments on commit 807a47e

Please sign in to comment.