Virtual Filesystem with C/C++ under Windows [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am currently developing a game which simulates an operating system. Therefore i need an ingame filesystem. Currently, i am using zziplib to be able to load files from a zip archive, however this is a readonly "filesystem" and i need a way to write new files and serialize them afterwards (and deserializing them during the next execution)! Are there any useful libraries out there in the wild to be used or should i write one for myself based on any ones?

This is probably one of the places where using a simple database as a filesystem makes sens.
Use something like sqlite to store the data (with paths as keys, blobs as data, or something like that).
One of the advantages of doing this is that you don't actually have to worry about the storage, and you can use existing database tools to view/edit the data "offline" rather than having to write your own. (Plus you can store other game info in there as well.)

You might check out PicoStorage and Embedded File System in C++. I haven't directly used either but I've looked at them both. Embedded File System does have a dependency which could be a show stopper -- it requires Qt to be linked in. Perhaps that could be removed, but it uses it mainly for QString and QFile (and would have no reason to require the UI).
Update, 9 years later: As commented, the above links no longer work. This alternative link for PicoStorage may be viable (I was able to download the source from there but I've made no effort to validate it) but I cannot locate a modern equivalent for EFS.

My six pence on top of the answers above. SolFS (now CBFS Storage) and CodebaseFS provide virtual file system capabilities; both have an API for C/C++ and appear to do exactly what you are asking about. Still... the scale of your task is not clear for me. Does your game need to manage dozens, hundreds, zounds, ... of files? What are the sizes of those files? Etc, etc. I would raise these questions before looking for an appropriate solution.

Related

read/write the excel file in c++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have to read/write the excel file in C++. I searched in net I found may library file which provides the functionality to parse the Excel sheet but those library are not opensource.
Can any one let me know the easiest way to read/write excel file in c++.
If you suggest and predefine library then it should be free of cost.
Several routes:
If you're parsing character separated value files, then you can use simple iostreaming.
Develop an XLL. Download the Excel SDK and go from there. The framework example in that SDK is pretty good.
Use the COM interface. For this you'll need something like Microsoft's ATL. Low level COM, though possible, is difficult.
Use Apache POI and a JNI / JNA layer to it.
(4) has the advantage that excel doesn't need to be installed so can run well server-side, but it will require Java. (3) is a learning curve if you haven't used COM in C++ before. Budget 6 months of mental fog.
In the absence of any more information, I'd plump for (2). The XLL interface is extremely good.

Tools for statically analyzing the size of a native Windows binary? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Are there such tools? If so, what are they called, and is there a generic, searchable term? "Image size profiler" doesn't seem to yield many results. I'm not even certain how you would tag this.
I'm looking for something that would take a native .exe or .dll, and using the .pdb file, would help elucidate why a binary is several megabytes in file size by visualizing what is taking up the most space. Hopefully capable of analyzing static variables/tables, code, and resources, and preferably free if possible.
Do tools exist to do the analysis statically, or is running it under a memory profiler the only option? Is there a free memory profiler that would help with the file size itself?
I have done this manually on occasion, using a linker map file, which lists all the functions, their positions and lengths.
It would be nice if there were a tool to take 20 uniformly distributed "stabs" into the .exe or .dll and tell me the name of the function it lands in.
If I did this often enough I would write one.
However, a simple way to see what's accounting for most of the space is to simply look at the map file, in random locations, and see what functions are in there.
As an example of what I mean, I have seen files where large I/O classes, or Date classes, or container classes, were included just because there was one variable declared with such a class but not even used.
Or a local class could inherit from a general system class, causing tons of stuff to be linked in, when the local class doesn't actually need it.
This can be easily spotted by just eyeballing the map file.

key value flat file database simple in C or C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
For a project i am looking for a simple database which is written in C (or C++) for a cross platform aplication.
After looking into HamsterDB (which looked promissing) i had found out, that it is dependen on boost on windows.
So the alternative should not relies on STL or other libraries as the Application will be run on different Eco Systems (like arduino,symbian,android,windows) and compiled on diferent IDEs.
It will store up ton 20mil keys(but usualy below 50k keys), IO will be low.
Therefor it should be as clean C (or C++) as possible.
Can somebody show me something which will fullfill this, ready made?
LevelDB is what you're looking for. It's written in C++ but C functions are available as well.
LevelDB is a fast key-value storage library written at Google that provides
an ordered mapping from string keys to string values.
Looks like Berkeley DB is an option to you. Not sure about the embedded part (especially for arduino).
You can find a complete tutorial at standford's classes.

Looking for C++ datawarehousing for time series data [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I need a C++ library that can store and retrieve time series on demand to stream to client front-ends. I will be storing each component as structure of arrays format. I am currently using MySQL for correctness, but the DB access is starting to get ridiculously slow. I am trying to migrate away from this. Intuitively I can build such a library but it is not my business goal and will take quite a bit of implementation to get working. I am looking for an existing solution that can meet the following requirements:
O(1) lookup scheme
Excellent compression, each component is separated, so there should be plenty of redundancy that can be removed
Scalable to terabytes
(optional: Audit tracking)
Most important: Transactional support. There is going to be BIG data, and I can't have the possibility of a bad run corrupt an entire dataset which will create an unnecessary burden for backups and downtime during restores.
Also checkout TempoDB: http://tempo-db.com I'm a co-founder, and we built the service to solve this problem. We don't have a C++ client yet, but could work with you to develop one.
Take a look at OpenTSDB it's been develop at StumbleUpon by Benoit Sigoure:
http://opentsdb.net/
TeaFiles provide simple and efficient time series storage in flat files, enriched with item metadata and description. They might be a building block of the system you aim for. Currently free open source libraries exist for C++ (github.com/discretelogics/TeaFiles), C# and Python.
I am a founder of discretelogics and we coined this file format to overcome litations flat file time series storage while preserving its unrivaled speed.
Take a look at HDF5. It has a quick lookup scheme, has C, C++, Python interfaces. Has compression. Can get pretty big. Maintains metadata. Doesn't do auditing. You'll need a wrapper to handle multi-user capability.

Cross platform way to create file dialog in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am writing an application in which I need to be able to browse for an existing file and to create a new one. I need to create user interface for that. Is there any good cross-platform free library to help me do that?
If you're not already using a cross-platform UI library, then it doesn't make a lot of sense to introduce a dependency upon a huge library just to display a file dialog.
Since recommendations for a cross-platform UI library have already been hashed out repeatedly in other questions (use the search feature to find them if you're interested) and are probably off-topic anyway,
I'm going to take the liberty of assuming that such is not your question.
Therefore, the answer is that no, there is no reliable, cross-platform way of creating a file dialog. Each platform provides a different interface/API for this, so you'll need to write code to detect the current platform and then display the dialog as instructed by each platform's documentation.
You can do this either at run-time (if you want to have a single binary), or at compile-time by using conditional compilation (#if statements).
This is basically all that any UI library would be doing, and for such a simple requirement (a single feature) it makes sense to me at least to just do that work yourself.
You can give wxWidgets a try, a GUI library in C++, free, open-source,... and work with the native graphics libraries.