ulikunitz / xz

Pure golang package for reading and writing xz-compressed files
Other
477 stars 45 forks source link

How to write compress & decompress data in file? #43

Closed jjkim0816 closed 3 years ago

jjkim0816 commented 3 years ago

I want to compress xz type, but I don't know how to write to file.

Could you give me answer this question?

And how to decompress from xz file?

Thank you so much~^^

ulikunitz commented 3 years ago

I will prove an example later. In the meanwhile look at the example in the README. You need to replace the buffer with a file. File handling is provided by the os package.

ulikunitz commented 3 years ago

Hi, I have added examples for reading and writing files in https://github.com/ulikunitz/xz/blob/master/example_test.go.

I will not create a release for it, but I regard the issue as addressed.