mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-08 05:27:04 +00:00
question: write byte buffer to RAR file #551
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Dec 16, 2022).
Hi
I have a byte buffer filled of all bytes that represent the contents of a RAR file like this:
var buffer = new byte[length];Those contents in the buffer are read from a custom big file which has RAR files inside it (a sort of custom container).
Is there a way I can write this buffer to a RAR file using sharpcompress or how should I do this?
If I do this (without using any library):
File.WriteAllBytes(filename, buffer);Then WinRAR says the file has "unknown format or is damaged".
But the buffer is successfully written and the file has exactly the amount of bytes from the buffer.
Thanks
@ghost commented on GitHub (Dec 17, 2022):
I found it, closed.