Added support for restoring inf-mongo buffers

Hi,

The previous pull request got messed sorry for that. This is essentially the same pull request, it adds support for
[inf-mongo] (https://github.com/tobiassvn/inf-mongo). I have also made the changes you had suggested.