Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I wonder, what library you would choose for the following:
I need to be able to combine a bunch of files and folders (a tree of filesystem structure) into one file - archive, thus having one composite file.
the library must be cross-platform: Windows 7 and Linux
it must provide access to the content and ability to extract only one file (e.g. if I have an archive of data folder and if I need only data/subdata/file, only it should be extracted)
it must have C++ (preferably) or C API
I am not particularly keen on archiving, but it would be desirable, since I will be storing mostly text files and they compress well...
Any feedback is highly appreciated!
zlib in combination with Boost Iostreams is a great combination. This does not do file level extraction though.
EDIT:
Some other options I found via another SO question include:
Zipios++
QuaZIP - Requires QT, may not build on Windows
correctly
EDIT2:
Minizip (usually included with zlib) will do the trick too - probably the most lightweight and commonly used solution.
Consider libarchive.
http://gnuwin32.sourceforge.net/packages/libarchive.htm
zlib is probably the safe answer.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I wrote a program that opens the exe files. I want that program to read some specific assembly instructions with their addresses in an exe file. for example JAM or Call.
so, what API functions should I use. if you know any other sources that can be useful tell me ;)
If you want to read code in a Windows PE file (Portable Executable) you will first have to find the code section.
How to find this depends whether the exe is a 32-bit or 64-bit one (although they're pretty much the same for their internal structure), but I recommend you studying the PE format: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx
After that you will have to find the address in which your call code or whatever you want resides. What do you want to do with that binary code is up to you, if you intend to translate it into asm human-readable code you will need a translator (or code one up by yourself... pretty hard for a beginner) such as distorm (GPL and commercial license).
I hope this got you started to what you want to do.
A very good start will be to use a disassembly library, Capstone is one of them for example but more exists.
Then you will need to parse the PE executable format to extract the code to send to your disassembly library...
But in that domain libraries also exists, for example radare supporting most architectures and format (And it can be used with multiple disassembly libraries, including Capstone)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have tried Umbrello and ArgoUML; and both are unable to generate code from an existing c++ codebase. Though they have limited capabilities in these areas, they both fail spectacularly importing a file with std, boost, SDL and local includes. Is there anything in the FOSS world that will model reasonably complex c++ code. The UML part is optional, generating coherent and accurate visualizations of the code is what matters.
Note: Tools like gprof2dot as well as doxygen can process the source, but their output is so complex as to be equivalently difficult to grasp as the original code.
Note2: Since one cannot ask about tools on SO anymore, let me rephrase the question like this:
How, given a large, old, complex and crufty c++ code base, can one quickly and efficiently perform major refactorings. By major, I mean things like:
extracting entire structs/enums/classes from an existing source/header pair into their own files
adding/deleting namespaces
changing function signatures
etc.
Some things are approachable with grep and sed; however, discovering and managing include dependencies can be overwhelming. I'm currently stuck with the "change-and-fix" method -- try refactoring something and iteratively build and fix errors as the compiler point them out. For widely used objects, this is slow. What is the proper approach?
I used Doxygen for this on a couple of projects.
It wasn't great but it was better than starting from scratch.
This paper from 2005 describes the pilfer tool, which is now included within the srctools project. It's available under a GNU General Public License.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
In our project now we using log4cxx, but those library don't develope some years, also we have some problems with it.
Could you advise some library for logging in C++.
Library must support multithreade logging, system-log.
Also it'll be good if it support logging via << operator.
Also lib license must be very democracy - like boost, apache etc
Crossplatform support. Must support linux, windows. Better if it support solaris, aix, hp-ux, but it's not necessary.
boost::log is probably the most versatile and well-written logging library I've seen. It's pretty complicated but really genius at the same time. And it does everything you can think of and then some more.
I use the glog library, by google (because I could not install Boost.Log easily). It is both simple to use and powerfull.
We use log4cplus in our company, it provides a complex hierarchical logging system (based on log4j). It seems to have everything you are asking for. It provides many appenders (I personally choose this library for the rolling files linux/windows and linux Syslog).
The library is quite simple to compile and deploy on both linux & windows And do the job no problem so far (about 4 years in production).
Only drawback, the lack of documentation but the code it quite self-explanatory. Good new is you could go to the log4j documentation page to understand how configurators/patterns/etc works ...
Check out pantheios!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Does anyone know zip library of C/C++ in public domain license?
It meets the following requirements.
It operates by the unit like stb_image.c library
Supported cross platform. Windows, Mac, Linux and so on.
Language is C/C++
License is public domain.
I'd recommend ZipLib.
Personal reasons why I love this project:
built around c++11 stl streams (e.g. decompresses into STL streams!)
lightweight (no dependencies other than zlib)
can be used on both windows & linux
It took me a long time to find this project -- hope this helps someone.
It didn't yet exist when the question was asked. But it does now: miniz - public domain, single C file, explicitly inspired by the likes of stb_image.
The most popular open source zip implementation is Info-Zip. Deflate algorithm used in zip file format is implemented by zlib library. Both are released on liberal, BSD-like license, but not public domain.
It's not public domain, but Minizip, which is included with zlib, meets your other three requirements. It also contains miniunz.c, a very easy to follow zip/unzip example.
The closest I can think of would be Xz-utils, which uses the public domain LZMA SDK. It's not zip, per se, nor does it use the deflate algorithm, but it is one of the few compression libraries in the public domain.
Public Domain is the LZMA sdk from 7z
http://www.7-zip.org/sdk.html
Problem: the documentation is "not existing" :-(
http://www.bzip.org/ is pretty common and a requirement of tons of easy_installs in multiple target languages.
Update:
I realize this is wrong, but it's a common misunderstanding, so I'm leaving it up as a sentinel to describe a frequent error.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am looking for a simple C++ library for tokenizing and parsing RTF (Rich Text Format) files. I am planning to edit them with Qt's QTextEdit.
More the Formatting preserved the better -- but actually I am planning to use Bold and Italics only.
In perl I would use RTF::Tokenizer.
It would be nice if the module had some sort of interface for writing also, but I am able to brute force that with a template and some regular expressions.
I helped writing the RTF import export filter in KOffice. You can have a look at the code at https://cgit.kde.org/koffice.git/tree/filters/kword/rtf. The code is modular and it depends only on Qt.
A quick SourceForge search suggests librtf. It hasn't been developed in a while, but is listed as stable and is under the LGPL. I don't know whether it will support what you need, but I always suggest searching SourceForge for libraries.
You can ask the #koffice guys on irc.freenode.org over irc. Their program kword is able to open RTF files, and is indeed also written in Qt. I'm sure they would be glad to tell you about how they do it.