View Single Post
Old 06-23-2011, 09:23 AM   #16
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by Mackx View Post
I am not sure how many files can be in a FAT directory, should the System/_covers/ contains a directory structure?
For speed I'd suggest a structure like:
Code:
SD_card/System/.covers
    medium/
        00
        01
        ..
        FF/
            id.png
            other_id.png
            ...
    small/
        [similar to medium]
That's the way some programs work to avoid file system limitations.
If 256 subdirectories are not enough we could use a bigger number.
In order to make file loading as fast as possible we have to think in a map function that equally distributes covers in the 256 subdirectories. I can think of "id mod_of_256" (id % 256). Btw, does % operator exist in C?
Iņigo is offline   Reply With Quote