-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SquashFsBuilder.File
takes byte[] instead of Stream
for the file content
#2
Comments
The same applies to GetFileSystemImage itself, that returns byte[]. This is even worse, because if the image is big, the size of the byte[] could potentially cause memory issues. |
File
method SquashFsBuilder
takes byte[] instead of Stream
for the file contentSquashFsBuilder.File
takes byte[] instead of Stream
for the file content
Thanks, I'll think about it =) I want to upgrade and speedup code of this library. At now this library and application is using for rebuild and update small filesystems (~30 MB, embedded linux), for largest one it slow and not tested yet... |
OK, I hope it evolves in the right direction. It looks straightforward to use! If you need any advice, please find me in Telegram @SuperJMN. I'm making a very nice tool to distribute .NET applications and considered using DiscUtils, but it has a nasty bug and I had to look for alternatives. Your library looks fine! |
Ok =) I think, there is need to move NyaFs to separate repository |
Take this method invocation as an example:
The entry contents are taking from a byte[]. That could be a potential problem for large files. The whole byte[] needs to be allocated.
Using a
Func<Stream>
would be far better for the case because it would allow for huge files to be included.I suggest a Func instead of just Stream because this way, the library can control the lifetime of the stream, properly creating it and disposing it when it's no longer needed (during the call to
GetFilesystemImage()
)The text was updated successfully, but these errors were encountered: