Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Compression algorithms

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

Compression algorithms

  • Quote

Post by neuron » Fri Apr 22, 2005 12:42 am

Working on an overlay compressed filesystem (using fuse).

Now I have the "non compression" part down and working, but... running into some problems.

I need a compression library that'll allow me to:

A : know the size of the original file (so I can return that when software asks for filesize, if not read's and write's to file will screw up).
B : allow me to read specific parts of a file, not decode the entire thing every time.

Those two things would allow me to override read and write's with ease and make the codesize much more managable.

Got a feeling I wont find it, and I'll end up having to code something to cache the original filesize :/, if so I'll probably end up with zlib.

Really wish zlib's compressBound was accurate :/
Top
bdonlan
n00b
n00b
Posts: 44
Joined: Tue Jan 21, 2003 12:44 am

  • Quote

Post by bdonlan » Fri Apr 22, 2005 3:51 am

A : know the size of the original file (so I can return that when software asks for filesize, if not read's and write's to file will screw up).
B : allow me to read specific parts of a file, not decode the entire thing every time.
A can probably most easily be done in your own higher-level library. I doubt any compression libraries track this themselves. As for B, you'll need to read in since the last reset of the compression state in order to rebuild the compression state at the point you're reading from or writing to.

For efficient random access you'll probably need to break a file into a number of fixed size, independently compressed blocks, and delay some time before actually compressing them to combine writes. Not to mention find a way to pack these while minimizing slack space.
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

  • Quote

Post by neuron » Fri Apr 22, 2005 12:24 pm

yeah... think I'm just gonna start working on A, and see if I can't figure B out once I've done that.
Top
Post Reply

3 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic