Jump to content
  • Advertisement
Sign in to follow this  
ill

How efficient is PhysFS at buffering file IO data.

This topic is 1995 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I'm using PhysFS to do file I/O on windows, linux, mac, Android, and I think it'll work on iOS as well.

 

PhysFS has file read functions like PHYSFS_ReadSLE16 to read a signed little endian 16 bit value from a file.

 

I assume it does something internally with the files to make this efficient, such as unzipping blocks of the file at a time and keeping a buffer to read from rather than unzipping the file every time I want to read a single value.

 

 

 

 

OK, after a lot of reading of the docs I found the PHYSFS_SetBuffer function.  It says that file IO is unbuffered by default.  I guess that solves that question.

Edited by ill

Share this post


Link to post
Share on other sites
Advertisement

Thanks for bringing this up to my attention =P *modified his code to enable buffering*

 

What would be a good buffering size? Assume it's for reading files from compressed archives (e.g. ZIP or 7Z, assume they aren't solid). Currently I set it to 4KB but I'd like to know if there's a better value for this.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!