lz4net | ultra fast compression algorithm - for all .NET platforms | Compression library
kandi X-RAY | lz4net Summary
kandi X-RAY | lz4net Summary
LZ4 - ultra fast compression algorithm - for all .NET platforms
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lz4net
lz4net Key Features
lz4net Examples and Code Snippets
Community Discussions
Trending Discussions on lz4net
QUESTION
I've got an iOS app compressing a bunch of small chunks of data. I use compression_encode_buffer running in LZ4 mode to do it so that it is fast enough for my needs.
Later, I take the file[s] I made and decode them on a non-Apple device. Previously I'd been using their ZLIB compression mode and could successfully decode it in C# with System.IO.Compression.DeflateStream.
However, I'm having a hell of a time with the LZ4 output. Based on the LZ4 docs here, Apple breaks the stream into a bunch of blocks, each starting with a 4-byte magic number, 4-byte decompressed size, and 4-byte compressed size. All that makes sense, and I'm able to parse the file into its consituent raw-LZ4 chunks. Each chunk in the buffer iOS outputs decompresses to about 65,635 bytes, and there's about 10 of them in my case.
But then: I have no idea what to DO with the LZ4 chunks I'm left with. I've tried decoding them with LZ4net's LZ4.LZ4Stream, LZ4net's LZ4.LZ4Codec (it manages the first block, but then fails when I feed in the 2nd one). I've also tried several C++ libraries to decode the data. Each of them seem to be looking for a header that the iOS compression functions have encoded in a non-standard way.
...ANSWER
Answered 2017-Apr-10 at 11:57Answering my own: Apple's LZ4 decompressor (with necessary modifications to handle their raw storage format) is here: https://opensource.apple.com/source/xnu/xnu-3789.21.4/osfmk/vm/lz4.c.auto.html
Edit afterwards: I actually wasn't able to get this working, but I didn't spend much time on it because I found Apple's LZFSE decompressor.
LZFSE Decompressor can be found here: https://github.com/lzfse/lzfse
QUESTION
My goal is to write a C# program to test with Cassandra database.
In VS2013, I've tried .NET 4.51, 4.5, 4.0, and even 3.5. With 4.5 this is the error I get:
PM> Install-Package CassandraCSharpDriver Attempting to resolve dependency 'lz4net (≥ 1.0.10.93)'. Attempting to resolve dependency 'Microsoft.Extensions.Logging (≥ 1.0.0)'. Attempting to resolve dependency 'Microsoft.Extensions.Logging.Abstractions (≥ 1.0.0)'. Installing 'lz4net 1.0.15.93'. Successfully installed 'lz4net 1.0.15.93'. Installing 'Microsoft.Extensions.Logging 1.0.2'. You are downloading Microsoft.Extensions.Logging from Microsoft.Extensions.Logging, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'Microsoft.Extensions.Logging 1.0.2'. Installing 'Microsoft.Extensions.Logging.Abstractions 1.0.2'. You are downloading Microsoft.Extensions.Logging.Abstractions from Microsoft.Extensions.Logging.Abstractions, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'Microsoft.Extensions.Logging.Abstractions 1.0.2'. Installing 'CassandraCSharpDriver 3.2.1'. Successfully installed 'CassandraCSharpDriver 3.2.1'. Adding 'lz4net 1.0.15.93' to CassandraTester. Successfully added 'lz4net 1.0.15.93' to CassandraTester. Adding 'Microsoft.Extensions.Logging 1.0.2' to CassandraTester. Uninstalling 'Microsoft.Extensions.Logging 1.0.2'. Successfully uninstalled 'Microsoft.Extensions.Logging 1.0.2'. Uninstalling 'lz4net 1.0.15.93'. Successfully uninstalled 'lz4net 1.0.15.93'. Install failed. Rolling back... Install-Package : Could not install package 'Microsoft.Extensions.Logging 1.0.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. At line:1 char:1 + Install-Package CassandraCSharpDriver + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM>
...ANSWER
Answered 2017-Apr-07 at 18:26So far my get-around has been to go back to a prior version:
Install-Package CassandraCSharpDriver -Version 3.1.0
I found the version history here: https://www.nuget.org/packages/CassandraCSharpDriver
At least it installed now.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lz4net
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page