bin serializer: finish deserialization and add tests