SDL_RWOps and Compression

Has anyone had any success using SDL with any sort of compression
lately? (zlib, zziplib) The tutorials linked to by libSDL.org are now
down, but after I found a cached copy and was preparing to mirror them I
decided to actually try the technique described, but the example code
used functions which I was told haven’t been part of ZZipLib in over a
year (specifically the fread and seek functions) If anybody has example
source, or an another library that can be used alongside SDL please post
code or links.

      Thanks,
         James

I’ve been using ZipArchive under win32.
It states that it compiles under Linux using the STL instead of MFC, so I
presume it will work.
It seems quite good.
Is there more of a general ‘pak file’ style approach library? I’d love to
simply add all my resources to a file I don’t want users to gain access to.
ZipArchive allows password protection, but is a zip frontend, so people can
still view the list of files in your archive if they want to.

http://www.artpol-software.com/index_zip.html>From: James Turk

Reply-To: sdl at libsdl.org
To: sdl at libsdl.org
Subject: [SDL] SDL_RWOps and Compression
Date: Wed, 09 Oct 2002 21:24:53 -0400

Has anyone had any success using SDL with any sort of compression 

lately? (zlib, zziplib) The tutorials linked to by libSDL.org are now
down, but after I found a cached copy and was preparing to mirror them I
decided to actually try the technique described, but the example code used
functions which I was told haven’t been part of ZZipLib in over a year
(specifically the fread and seek functions) If anybody has example source,
or an another library that can be used alongside SDL please post code or
links.

     Thanks,
        James

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Rob Sadedin
No Substance Software (www.nosubstancesoftware.com)


Send and receive Hotmail on your mobile device: http://mobile.msn.com

 Has anyone had any success using SDL with any sort of compression

lately? (zlib, zziplib) The tutorials linked to by libSDL.org are now
down, but after I found a cached copy and was preparing to mirror them I
decided to actually try the technique described, but the example code
used functions which I was told haven’t been part of ZZipLib in over a
year (specifically the fread and seek functions) If anybody has example
source, or an another library that can be used alongside SDL please post
code or links.

I’m not sure what you mean by “using compression with SDL”, but I’m using
ZLIB and SDL on a video game I’m working on. What kind of compression?
Graphics? Sound? Something else?

–>Neil-------------------------------------------------------------------------------
Neil Bradley What are burger lovers saying
Synthcom Systems, Inc. about the new BK Back Porch Griller?
ICQ #29402898 “It tastes like it came off the back porch.” - Me

Go here: http://www.icculus.org/physfs/ - It’s doesn’t get any better !!> ----- Original Message -----

From: Neil Bradley [mailto:nb@synthcom.com]
Sent: Thursday, 10 October 2002 12:12
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_RWOps and Compression

 Has anyone had any success using SDL with any sort of compression 

lately? (zlib, zziplib) The tutorials linked to by libSDL.org are now
down, but after I found a cached copy and was preparing to mirror them
I decided to actually try the technique described, but the example
code used functions which I was told haven’t been part of ZZipLib in
over a year (specifically the fread and seek functions) If anybody
has example source, or an another library that can be used alongside
SDL please post code or links.

I’m not sure what you mean by “using compression with SDL”, but I’m using
ZLIB and SDL on a video game I’m working on. What kind of compression?
Graphics? Sound? Something else?

–>Neil



Neil Bradley What are burger lovers saying
Synthcom Systems, Inc. about the new BK Back Porch Griller?
ICQ #29402898 “It tastes like it came off the back porch.” - Me


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/02


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/02


The information transmitted is for the use of the intended recipient only
and may contain confidential and/or legally privileged material. Any
review, re-transmission, disclosure, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited and may result in
severe penalties. If you have received this e-mail in error please notify
the Security Adviser of the Department of Communications, Information
Technology and the Arts, telephone (02) 6271-1880 and delete all copies of
this transmission together with any attachments.


I’ve been using ZipArchive under win32.
It states that it compiles under Linux using the STL instead of MFC, so I
presume it will work.
It seems quite good.
Is there more of a general ‘pak file’ style approach library? I’d love to
simply add all my resources to a file I don’t want users to gain access to.
ZipArchive allows password protection, but is a zip frontend, so people can
still view the list of files in your archive if they want to.

This is a losing strategy, since users are going to find a way to get into
that zipfile, password or not.

Generally, end users don’t tinker with data, but it’s convenient to put it
in an archive anyhow. Those that want to tinker are going to do so.

(and even though there’s no password support, PhysicsFS gives you a
general ‘pak file’ approach: http://icculus.org/physfs/ )

–ryan.

James Turk wrote:

Has anyone had any success using SDL with any sort of compression 

lately? (zlib, zziplib) The tutorials linked to by libSDL.org are now
down, but after I found a cached copy and was preparing to mirror them I
decided to actually try the technique described, but the example code
used functions which I was told haven’t been part of ZZipLib in over a
year (specifically the fread and seek functions) If anybody has example
source, or an another library that can be used alongside SDL please post
code or links.

What do you mean with “functions not part of zziplib”? The patch to add
full seek-functionality was accepted a looong time ago. What version of
zziplib to you tinker with, some 10.6x hopefully? http://zziplib.sf.net

I’ve been using ZipArchive under win32.
It states that it compiles under Linux using the STL instead of MFC, so I
presume it will work.
It seems quite good.
Is there more of a general ‘pak file’ style approach library? I’d love to
simply add all my resources to a file I don’t want users to gain access to.
ZipArchive allows password protection, but is a zip frontend, so people can
still view the list of files in your archive if they want to.

This is a losing strategy, since users are going to find a way to get into
that zipfile, password or not.

Generally, end users don’t tinker with data, but it’s convenient to put it
in an archive anyhow. Those that want to tinker are going to do so.

(and even though there’s no password support, PhysicsFS gives you a
general ‘pak file’ approach: http://icculus.org/physfs/ )

I’ve added obfuscation-functionality to zziplib and it works really well,
you can create pak-files that don’t look like zip-files even that they are.
It is currently used in some projects, some even commercial. Just come
around and use it.

However, I’d like to add that I do reject all requests for standard zip-pass
encryption - just read about the rationale at http://zziplib.sf.net/zzip-xor.html

If anything else’s missing, you’re welcome. And it would be nice to see an
in-depth sdl_rwops tutorial on using xor-zip obfusction with zziplib.

Cheers, guido http://zziplib.sf.net

Guido Draheim wrote:

James Turk wrote:

Has anyone had any success using SDL with any sort of compression 

lately? (zlib, zziplib) The tutorials linked to by libSDL.org are now
down, but after I found a cached copy and was preparing to mirror them
I decided to actually try the technique described, but the example
code used functions which I was told haven’t been part of ZZipLib in
over a year (specifically the fread and seek functions) If anybody
has example source, or an another library that can be used alongside
SDL please post code or links.

What do you mean with “functions not part of zziplib”? The patch to add
full seek-functionality was accepted a looong time ago. What version of
zziplib to you tinker with, some 10.6x hopefully? http://zziplib.sf.net

  I apologize for posting what I did about zziplib, the person I had 

talked to in a chat was clearly mistaken about the zziplib project, and
I am once again looking into using zziplib to meet my needs. It looks
like this version (0.10.66, previously I failed to notice the
zziplib-preview release on sourceforge) includes functionality whatever
version I had before did not seem to support.

      -James

Thanks to everyone for all the replies,

Go here: http://www.icculus.org/physfs/ - It’s doesn’t get any better !!

Thanks for the link, I’m evaluating my various options now.

I’m not sure what you mean by “using compression with SDL”, but I’m using
ZLIB and SDL on a video game I’m working on. What kind of compression?
Graphics? Sound? Something else?

I’m looking for just a general packed file format, I wrote my own but
realized that compression would be much more efficient. My last resort
would be to write one using Zlib, but I believe it would be much easier
to avoid reinventing the wheel, and these all look like viable options.