Not that I'm aware of. A couple years ago I wanted to give a program of mine ZIP support, and found that there was just no way to do that without implementing ZIP myself.
Irrlicht has a rather nice ZIP interface IIRC, so you might want to take a look at how they do it.
I wrote one that I never released publicly because it still hasn't been fully tested or documented. Since it's unlikely that I'll get around to doing that in the near future, I'll just link to it here. If you don't mind using something that's pre-alpha:
#include <libacdc.h>
#include <cstdint> // for uint8_t
int main()
{
//===================================================
// Opening a file "normally" from the OS's filesystem
{
auto file = ac::fs.openFile("myfile.bin");
uint8_t buffer[10];
file->read(buffer, 10); // read 10 bytes
}
//===================================================
// Opening a file from an archive
auto zip = ac::fs.openFileSystem("myzip.zip"); // open the zip as a FileSystem
auto file = zip->openFile( "path/someotherfile.bin" );
uint8_t buffer[10];
file->read(buffer, 10);
}
Unfortunately, the definition of public domain varies with the jurisdictions, and it is in some places debatable whether someone who has not been dead for the last seventy years is entitled to put their own work in the public domain.
Even with PD you run into issues. Wasn't there a game that had the code released to PD, but people started using the art and music to only be sued because they weren't included part of the PD? You have to be very careful even with PD.
...which is why you should use a simple, common, legally unambiguous license that gives people all the rights they want except stealing your work.
Like Boost's.
If you'd read the link you'd get more good reasons. The best of which is -- people will actually use your code. (License-less code scares legal departments!)
@LB
I don't think it is ever about caring that it is stolen, it is more about them taking it, tweaking it slightly, the putting it out as theirs for profit. If you aren't properly covered by a proper license, you could be stuck watching them make a profit off your idea and you get nothing for them using your code.
If you aren't properly covered by a proper license, you could be stuck watching them make a profit off your idea and you get nothing for them using your code.
I literally don't care.
Anyone can do whatever they want with the code I posted and I'm fine with it.