irmen / pickle

Java and .NET implementation of Python's pickle serialization protocol
MIT License
80 stars 6 forks source link

seems cannot load compressed file #5

Closed BlueD closed 3 years ago

BlueD commented 3 years ago

I'm using pandas to save a dataframe with 'xz' compression.

df.to_pickle("abc.pickle", compression="xz")

and the dotnet version threw an exception while loading it.

Unhandled exception. Razorvine.Pickle.InvalidOpcodeException: invalid pickle opcode: 253
irmen commented 3 years ago

Well, yeah, a compressed pickle isn't a pickle byte stream. You'll have to decompress it first.

BlueD commented 3 years ago

You are right. Ok, Thanks.