Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^5: Very Large Hex Combinations

by Anonymous Monk
on Aug 04, 2005 at 16:23 UTC ( #480911=note: print w/replies, xml ) Need Help??

in reply to Re^4: Very Large Hex Combinations
in thread Very Large Hex Combinations

Eh, may I suggest starting with smaller sized pictures? Say, 8x8 bitmaps? Of which there are 18446744073709551616, each taking 8 bytes of storage. You only need 137438953472 disks of 1 Tb each to store them. Suppose you can install one such disk each second, and you never tire, you don't need sleep, you don't need to eat, and don't go to the bathroom. Furthermore, disk companies manage to supply you with enough disks. Then you only need 4355 years to install the disks to store your all your 8x8 bitmaps.

After doing the 8x8 bitmaps, you might want to tackle the 12x12 bitmaps. If you can install 1Tb of storage each second, you only need 9 * 10^35 years to install your storage.

Replies are listed 'Best First'.
Re^6: Very Large Hex Combinations
by ikegami (Pope) on Aug 04, 2005 at 16:41 UTC

    8x8 bitmaps have file sizes of 246 bytes.
    8x8 bitmaps take 4096 bytes of disk space (under NTFS).
    Thus, all 8x8 bitmaps would take over 75,557,863,725,914 GB of disk space.

    I suppose you could invent your own archival format and image format where it would take the miminum 147,573,952,590 GB

      8x8 bitmaps contain 64 bits of data. You can store that in 8 bytes. I don't know where you get your 246 bytes from, GIF? JPG? If you want to store them in a format known by image viewers, I'd go for PBM, which, for 8x8 bitmaps, needs 7 additionaly bytes of overhead: the magic number (P4), and the width and height of the image, each encoded in ASCII. And each of the three pieces of data is followed by whitespace.

      But you don't have to store them in a file system (many file systems will use 8k blocks, where each block can be used by at most two files, hence the 4096 bytes you mention. But some file system can subdivide blocks into smaller fragments, and allow you to use smaller blocks as well, but I disgress) - you can store them on a raw disk as well. Using a format (such as P4) that has a fixed size, finding them on a raw disk would be easy.

      Of course, even if it was feasable, there's no point in generating and storing each possible image. You might as well generate the images when you need them.

        I don't know where you get your 246 bytes from
        Windows Bitmap.
        But you don't have to store them in a file system
        I already covered and explained that. The minimum non-compressed size (i.e. no space lost to headers and disk format) for monochrome 8x8 images is 147,573,952,590 GB. Even if it's compressed down to 1% of it's original size, it would still be 1,475,739,526 GB.
        there's no point in generating and storing each possible image.
        We could study the time domain, which maks this venture equally unfeasable.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://480911]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2017-08-22 02:14 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (326 votes). Check out past polls.