It's entirely possible to have corrupted file that still matches ``<<BloomSize:32, SerializedBloom:BloomSize/binary, _Rest/binary>>`` but has corrupted data for `SerializedBloom` field. Thus, `ebloom:deserialize` will crash. 

And this isn't a nice little crash with an exception. `ebloom` is a NIF and as written it assumes the incoming binary is valid. In other words:

```
ebloom:deserialize(<<"123">>).
beam.smp(57947,0x108008000) malloc:
*** mmap(size=1152921504606846976) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminate called throwing an exception                                                                                                               Abort trap: 6
```

Yep, my entire Riak VM just crashed. Those pesky and dangerous (but oh so useful) NIFs!

You're probably going to want to MD5 your serialized bloom and prepend that when you write to disk, and re-evaluate on read. Something like (note: this is Github comment-field written code, may not compile):

```erlang
<<BloomSize:32, MD5:16/binary, SerializedBloom/binary, _Rest/binary>> ->
  case crypto:md5(SerializedBloom) == MD5 of
    true ->
      {ok, Bloom} = ebloom:deserialize(SerializedBloom);
    false ->
      Bloom = new_bloom()
  end
```