Deserializes the given byte array into an object and returns it.

def loads(self, data):
        """
        Deserializes the given byte array into an object and returns it.
        """
        st = BytesIO(data)
        try:
            return self.load(st)
        finally:
            st.close()