Create .tar with large files and send it over network without creating .tar locally #822
Unanswered
Shaggy84675
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The linked example absolutely uses streams.
It shows how to read from the stream into a buffer and send it to the output, without having to keep the entire file in memory. If you replace the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm trying to create .tar file and send it over network with SMBLibrary. The library doesn't support streams, so I need to send them as byte array (https://github.com/TalAloni/SMBLibrary/blob/master/ClientExamples.md#write-a-large-file). The files packed inside the .tar can have even over dozens of gigabytes, so I can't save the output stream in the memory and we also don't want to pre-save them as a file. I'm thinking about few solutions how could I achieve that, but I have no idea which would be the best. First idea was write and read from the memory stream at the same time, but this sounds pretty complicated and maybe it's not even neccessary? Second idea came later when I was thinking I could probably create the neccessary headers, read the file and append it after. Is it possible to achieve that with this library? Or maybe there is even simpler solution I can't think about now. I also saw, there's an example to create tar manually, but I'm not really sure how can I use that in combination with the library.
Beta Was this translation helpful? Give feedback.
All reactions