I have made a compression in c/c++ (NO UNDER THE CLR) using the library zlib.h, and it works great. the functions that I use deflate() and inflate().
Now the file compressed by the c application, I want to decompress it with the zlib.net application, using c#, but I do not manage to get it working. When trying to decompress it, I get the error of the magic number, a number used by an specific application in the header. Does anyone know how to get through this problem, or if someone can give me an example of the inflate()/deflate() functionality in .net
for more info on how I have done my compression, is similar to the one in the link http://www.zlib.net/zlib_how.html
Also, can any one advice me of a good lib to perform compression in both c++ and .net,
Many thanks in advance...
There's some discussion on this here: Zlib-compatible compression streams?
I think Boost may work with zlib to add the header information: http://www.boost.org/doc/libs/1_36_0/libs/iostreams/doc/classes/gzip.html
Related
Hello I am wanting to translate resource files into a new language. I have looked into this however it doesn't seem to work any more. I was wondering if there is a new way.
I have also found this which seems overkill as you have to pay for it. I have maybe 10 files to translate, and 100 items on each file. Is there a good way to do this pragmatically?
You need an actual bi-lingual human for this.
Machine translation is mostly understandable, but people will know what you did and ridicule you for it unless you're going between closely related languages or languages where Google has a lot of training data.
Google Translate does work. You just need to use their API. and provide credentials
edit
I have maybe 10 files to translate, and 100 items on each file.
If you really only have 10 files to translate, and only need to do it once, and don't mind a machine translation, you can copy and paste them into https://translate.google.com/
You can find sample code for using the Translation API C# library and the steps to set up all prerequisites, including passing your credentials to the library in this quickstart. For additional options, you may refer to the library’s reference.
does anyone has a clue how the RTMPS-Protocoll works? I haven't found any source code, documentation or libraries for vb.net/c# on the web!
I read somewhere that it's only a TCP connection, but is this right?
If yes, how can I use this?
Could you pleas provide me source code, a library or a documentation?
Thanks in advance!
--
coolerfarmer
Check out RTMPdump I used to work with it a while back so I don't know how well it has been maintained in the mean time. However be sure to have a look at the clean-room specification. I used that document as a starting point to implement my own RTMPS protocol, however I wasn't able to ever finish it.
On a personal note, I would recommend using C# or even C++ to implement a client, if you know those languages as well as vb.net
For my backup tool, I'm still looking for a good delta encoding algorithm, that can handle a binary file. Problem is, I've got pretty huge binary files, e.g. 600MB and up. So, it's pretty hard for a 32bit application to assign up to 10 Gig of RAM. Honestly, it's impossible.
So I looked at the csharp bsdiff implementation found here. It's pretty cool, but loads the whole file into a byte array. So, does anyone now an implementation that can handle large files? I mean, REALLY large files?
Assuming you're running on a Windows environment, look at Remote Differential Compression. It was developed as an improvement upon rsync with the premise you have a server and a client with similar versions of a file, with one being the "master", and you want to sync them together.
C# wrapper on the COM libraries can be found here.
Are there any libraries (paid or free, though free is obviously better) that provide forward error correction for .NET applications? I've tried looking through the source code of some of the open source C / C++ libraries, but quite frankly, the math is confusing and my inability to read other peoples' C code with any reasonable level of clarity is a major road block.
If you have free C++ libraries why don't you try to build CLI wrapper around them?
Forward Error Correction is for instance used in media streaming.
A quick google search on "forward error correction" does not reveal much, but you could go another way:
Compile the C/C++ implementation (for instance from the list on Christian Schuler's Forward Error Correction (FEC) Page) of your choice into a DLL, then use P/Invoke to call functions in that DLL.
Another option that might fit you is to use the .NET interface to the Windows Media Services 9 series.
It contains the IWMSPublishingPoint interface that has a EnableFEC property.
--jeroen
Have you looked at the PAR2 format specification? PAR2 files provide raid-like parity for downloaded files (mostly popular on usenet binary groups). Although PAR2 is probably the wrong granularity for you, you should be able to change that once you know how it works.
I found a free library on github (made by antiduh):
https://github.com/antiduh/ErrorCorrection
As it said:
A library to implement Reed-Solomon encoding. Reed Solomon is a method of encoding data with extra error correction information built in, so that errors in received data can be corrected without having to retransmit the data; this technique is also known as Forward Error Correction (FEC).
I would like to write all meta data (including advanced summary properties) for my files in a windows folder to a csv file. Is there a way to collect all the attributes? I see mp3 files have a different set of attributes compared to jpg files. (c#)
This can also be a script (vb, perl)
Update: by looking at libextractor (thank you) I can see this can be achieved by writing different plugins for different type of files. I gather this meta data is not a simple collection...
In Perl, you can use MP3::Tag or MP3::Info
If you can cope w/ VB.Net: http://www.codeproject.com/KB/vb/mp3id3v1.aspx
If you can cope w/ C++/.Net: http://www.codeproject.com/KB/audio-video/mp3fileinfo.aspx
For either (assuming the C++) is compiled to .Net, you can use Reflector to disassemble the binary and convert it to C#. Check w/ the respective authors about their licenses first (usually Code Project articles are under an open license like CPOL).
In a library? Try libextractor if your software is GPL.
Ok, after the clarification edits, I would suggest looking at the introspection available in .Net. I will warn you however that I think you will get more satisfying results if you forgo introspection and define the specific properties that you want for the file types that you expect to see.
Since scripting is valid, then if this were my problem to solve I would use Powershell since the .net introspection is baked in.
It may not be worth it to add all of the data from a jpeg file (exif data). I would hand pick what attributes I wanted from those files.