def from_buffer(data, uncompress=False): if native: return ms.buffer(data) else: m = magic.Magic(uncompress) return m.from_buffer(data)