As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
File compression is a very important matter now a days. I am a C# programmer. I heard about DotNetZip, SharpZibLib, GZipStream etc. Confused about which one is the best. What I need are:
1: Faster compression speed
2: Better encryption
3: Both zip, unzip facility
4: Password protection
5: Free and enough reference/tutorial
6: Easier for beginner
7: Add files having .mp3, .txt etc format
8: Can work with many files(say 500 at a time, total 1/2 GB)
Thanks in advance
Update: Time is more more expensive than space :)
I have used DotNetZip in some projects and it supports all the things you want. Considering the speed, you have to choose between speed a compression, thats just how zip works. The library provides an option for you to choose whant compression level you want.
The library is well documented and really easy for beginners. Starting with it is just about installing 1 nuget package and calling zipFile.AddFile and zipFile.Save.
http://nuget.org/packages/DotNetZip
They have different uses. The GZipStream class is part of the framework, and has the capability of compressing a single file.
If you want to compress several files into a single archive (that can be uncompressed by someone else), you need a library that adds that capability. Such libraries can also have setting to control the balance between perforance and compression rate, to achieve better performance or better compression rate than the built in class.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've made a typo in my password back in the days when 7-zip didn't have a 'confirm pwd' field. So now I have a pwd-protected 7-zip file. I've writen some software to generate most likely typo variations of my password (55 million) and stored those in a file per 25k. Now I'm trying them out, one-by-one. I can do about 25k pwd's in an hour, using the unar commandline tool on a Macbook.
It works, but it will still take a nice 100 days (24/7) to go through all 55 mln pwds. Now I'd like to know, if there's some library (c# mono/dotnet) that supports decoding a 7z file that is pwd protected?
Any other suggestions on fixing my problem are also welcome.
To speed up the brute force, look into using CUDA or OpenCL.
These will let you utilise the GPU of the host machine to perform your processing, and will produce results much faster.
25K passwords per hour is quite low - when hash cracking (for example), a good tool using GPU will be able to hit 9500million passwords a minute on a mid-high end GPU.
Whilst hitting that figure is unlikely when trying to break 7z, you could definitely see a speed increase.
Also - the better the PC, the better the result. In many cases a Linux box is your best bet. If you can use a cluster of computers - all the better.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have a 500+GB text file. it has to be searched for duplicates, remove them, sort and save final file. Of course for such big file, the LINQ or such things are not good at all and will not work so they have to use External Sorting. there is an app called "Send-Safe List Manager". its speed is super fast, for a 200MB txt file it gives the result in less than 10 seconds. after examining inside the exe using "Greatis WinDowse" app i found that it has been written in Delphi. there are some external sorting classes written in C#. i have tested a 200MB file with them and all were over 1 minute. so my question is that for this kind of calculations is Delphi faster than C# and if i have to write my own, then should i use delphi? and with C# can i reach that speed at all?
Properly written sorting code for large file must be disk bound - at that point there essentially no difference what language you use.
Delphi generates native code and also allows for inline assembly, so in theory, maximum speed for a specific algorithm could be easier to reach in Delphi.
However, the performance of what you describe will be tied to the IO performance, and the performance difference between possible algorithms will be of several orders of magnitude more than the Delphi vs. .NET difference.
The language is probably the last thing you should look at if trying to speed that up.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Is there a .dll I can use which uses a PDF file as an input and HTML file as an output?
I want to convert from PDF to HTML. My colleague says that it's very difficult going step by step, getting text/font/image/margins/links etc. from PDF and then creating new HTML file with the same content. He says it's nearly impossible. So I was thinking - if there's some dll which I can use as a reference to do that?
Writing a program to do it is definitely not trivial. If you don't find any .NET Library to do this (I couldn't, at least not free), I would just download this and invoke it programmatically to get my html.
If you have the time to spare and/or PDFToHtml does not produce acceptable output for you, you could use iText to write the program yourself. It's a very mature free pdf library. I've used it in the past to manipulate PDFs (merge, create, etc).
UPDATE
As noted in the comment by Quandary, the PDFSharp library offers a more relaxed license (MIT) compared to the Commercial or AGPL license offered by iText. Keep this is mind when choosing your library. I have not used the PDFSharp library myself and I don't know how they compare in terms of functionality.
You can download this free tool: PDFToHTML
Then in your program just fork a new process and run the executable passing the PDF file. I just tested it now and it seems to work ok.
If you don't mind paying, Aspose offers a very good solution, this is what we use at my company.
http://www.aspose.com/categories/.net-components/aspose.pdf-for-.net/key-features.aspx
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
let's say that we ignore the target and source hardware for a moment. So, what's the better endian style to go with -- big or small?
I'm just trying to go with consensus / convention on this one. The best guidance I've received so far is "it depends" so always specify. That's fine. I'll do that.
However, in this situation there is no need to be one way or the other. There's no legacy, so I thought, "what would be the cleanest choice for current & emerging hardware."
Use whatever is predominant in your hardware. Or use "network byte order" (big endian) because the internet does. Or pick one at random. It's unimportant.
Don't choose. Just use whatever your compiler/platform uses. That gives no hassle and just works.
If you are doing raw network stuff, you may want to convert things to/from network endianness though, which is big endian. But don't mess up your whole code because of that. Just do the conversion when you get to the network writing part.
Actually the answer is it depends
If you just want a choice then Since in Big Endian high order byte comes first ,you can always check positive or negative from the first byte.
It doesn't matter. Just pick one.
This is a topic of endless debate. One does not hold a particular advantage over the other.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am in need of recommendations for a good C# .NET PDF library for a web application that will make heavy use of PDF forms. First, the library needs to have commercial licensing. Also, it needs to have robust features for merging data into PDF forms, extracting data, flattening form fields that have data, etc. If the library includes barcoding, that'd be great.
iTextSharp is fairly popular around here. It is available under AGPL and commercial licenses (with source of course).
It'll do just about anything that can be done with AcroForms-based PDF forms (including flattening), and can get/set values with LiveCycle Designer forms. It also supports the following symbologies:
Codabar
Code 39 (and variants)
Code 128
DataMatrix (2d)
EAN (8 & 13)
Interleaved 2 of 5
PDF417 (2d)
Postnet
UPCA and UPCE
Huh. I thought it supported code 93, but I don't see anything in the code here to back that up.
The book iText In Action 2nd Edition is pretty good. Commercial support is available (included with a commercial license), and the help here and on their mailing list is quite good.
Disclaimer: iTextSoftware pays me from time to time for services rendered. Whether or not you use decide to use iText will not affect that amount.