You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This exception occurs when decompressing files with actual large size (for example 900 MB).
To reproduce you can use this sample with a large file on your machine and I hope this error occurs to you too ;)
The text was updated successfully, but these errors were encountered:
It blows up in test, not in compression (source.Length * 255) is too large to allocate.
There are many things wrong with this example you gave. I mean I don't know which parts are just 'for example' and where you think it is the right way to use it, so:
for large amount of data you should you use LZ4Stream
you should know how much data you expect after decompression when using blocks (LZ4Codec), it is very ineffective to use length * 255
if you really dont want to use LZ4Steam and you don't want to implement your own block "packaging" use LZ4Pickler.
array.Take(length).ToArray() is one of the slowest ways to get a slice of array (this might be 10 slower then compression itself); you can use it for testing, but please don't use it for performance testing (array.AsSpan(0, length).ToArray() is not that bad)
This exception occurs when decompressing files with actual large size (for example 900 MB).
To reproduce you can use this sample with a large file on your machine and I hope this error occurs to you too ;)
The text was updated successfully, but these errors were encountered: