6gb Image into 5kb file?

Anything not about Mac emulation.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
scriptkiddie
Student Driver
Posts: 18
Joined: Mon Jul 05, 2004 2:03 am

6gb Image into 5kb file?

Post by scriptkiddie »

Some of you might this this is a very stupid question but I am very curious.... How on earth do you get a 6gb Hard Drive Image compressed into a 5kb zip file?
robojam
Forum All-Star
Posts: 779
Joined: Thu Apr 17, 2003 10:52 pm
Location: Charlotte, NC. USA

Post by robojam »

When it doesn't have any data on it, you can compress it a hell of a lot.

Compression can replace all the 'empty' data with something like "Here is 6GB of nothing" and then build 6GB of nothing when it is uncompressed.
Once you've made something idiot proof, they go and invent a better idiot!
scriptkiddie
Student Driver
Posts: 18
Joined: Mon Jul 05, 2004 2:03 am

Post by scriptkiddie »

so once it has data installed, it no longer can be compressed to such a small file?
robojam
Forum All-Star
Posts: 779
Joined: Thu Apr 17, 2003 10:52 pm
Location: Charlotte, NC. USA

Post by robojam »

No you can't. The more data in a particular piece of data storage, the less it can be compressed.
Once you've made something idiot proof, they go and invent a better idiot!
scriptkiddie
Student Driver
Posts: 18
Joined: Mon Jul 05, 2004 2:03 am

Post by scriptkiddie »

Thanks very much... thats exactly what I was wondering.
I didn't want to have to reinstall os x on my desktop so I was wondering if I could compress my hard drive to fit on to a cd-r.

No big deal, I just networked the two and copied it over. I now have two computers fully functioning w/ PearPC 2.0 and Panther 10.3.2
robojam
Forum All-Star
Posts: 779
Joined: Thu Apr 17, 2003 10:52 pm
Location: Charlotte, NC. USA

Post by robojam »

You can compress to a certain extent, it depends how much data there is.

If you wanted to put the HD file on CD's, you could always use WinRar to compress it and make CD sized pieces.
Once you've made something idiot proof, they go and invent a better idiot!
Simba7
Space Cadet
Posts: 4
Joined: Sat Jul 24, 2004 12:26 am
Location: Miles City, MT, USA
Contact:

Post by Simba7 »

I have a 6Gb file on my Win2K3 Installation and I've got the drive compressed. So the file is only around 2.5Gb in reality.

LOL. Should've seen it when it was empty..

1572858.0:1 Compression. LOL. Wish my entire HD was like that.
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

well, you probably still don't use the entire (virtual) hd, so it is still empty in some extent, so the xp compresses it still from 6gb to 2.5gb.
willhart
Apple Corer
Posts: 290
Joined: Fri Jul 23, 2004 8:22 pm
Location: right behind you.

Post by willhart »

I've seen that hard drive images in Virtual PC 6 (.vpc6) only take up as much space as is used, and can grow until it's actually the size of the real hard drive. Anyone know how they do this?

PS. When running Windows thru VirtualPC the free space on the virtual hard drive is the same free space on the actual hard drive.
MacOSX
Tinkerer
Posts: 52
Joined: Fri Jul 30, 2004 2:23 pm
Location: Canada

Re: 6gb Image into 5kb file?

Post by MacOSX »

scriptkiddie wrote:Some of you might this this is a very stupid question but I am very curious.... How on earth do you get a 6gb Hard Drive Image compressed into a 5kb zip file?
it's just like remebering something of nothing. nothing too much to remember!
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

willhart wrote:I've seen that hard drive images in Virtual PC 6 (.vpc6) only take up as much space as is used, and can grow until it's actually the size of the real hard drive. Anyone know how they do this?

PS. When running Windows thru VirtualPC the free space on the virtual hard drive is the same free space on the actual hard drive.
Virtual PC simply 'knows' when the virtual machine writes to the virtual hard drive, so it begins with a very small file, and writes to it only when needed. If I am not mistaken, such files are called sparse files.
User avatar
phirkel
Apple Corer
Posts: 237
Joined: Thu Feb 27, 2003 10:09 pm

Post by phirkel »

PPC_Digger wrote:
willhart wrote:I've seen that hard drive images in Virtual PC 6 (.vpc6) only take up as much space as is used, and can grow until it's actually the size of the real hard drive. Anyone know how they do this?

PS. When running Windows thru VirtualPC the free space on the virtual hard drive is the same free space on the actual hard drive.
Virtual PC simply 'knows' when the virtual machine writes to the virtual hard drive, so it begins with a very small file, and writes to it only when needed. If I am not mistaken, such files are called sparse files.
Close but no cigar.

Sparse files are files that have a defined size (say 6gb), however, they contain the same data, over and over again. So, the filesystem (usually something journaled, like HFS+J or ReiserFS/Ext3/JFS/XFS) transparently makes the file look like it's only the size of the non-sparse data on it.

There is, amazingly, a whole field of research dedicated to this.
willhart
Apple Corer
Posts: 290
Joined: Fri Jul 23, 2004 8:22 pm
Location: right behind you.

Post by willhart »

phirkel wrote:
PPC_Digger wrote:
willhart wrote:I've seen that hard drive images in Virtual PC 6 (.vpc6) only take up as much space as is used, and can grow until it's actually the size of the real hard drive. Anyone know how they do this?

PS. When running Windows thru VirtualPC the free space on the virtual hard drive is the same free space on the actual hard drive.
Virtual PC simply 'knows' when the virtual machine writes to the virtual hard drive, so it begins with a very small file, and writes to it only when needed. If I am not mistaken, such files are called sparse files.
Close but no cigar.

Sparse files are files that have a defined size (say 6gb), however, they contain the same data, over and over again. So, the filesystem (usually something journaled, like HFS+J or ReiserFS/Ext3/JFS/XFS) transparently makes the file look like it's only the size of the non-sparse data on it.

There is, amazingly, a whole field of research dedicated to this.
And what are the chances of having this incorporated in to PearPC? So far, making a 10gb PearPC imageand having Windows automatically compress it seems the closest that I can get to that.
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

willhart wrote:
phirkel wrote:
PPC_Digger wrote: Virtual PC simply 'knows' when the virtual machine writes to the virtual hard drive, so it begins with a very small file, and writes to it only when needed. If I am not mistaken, such files are called sparse files.
Close but no cigar.

Sparse files are files that have a defined size (say 6gb), however, they contain the same data, over and over again. So, the filesystem (usually something journaled, like HFS+J or ReiserFS/Ext3/JFS/XFS) transparently makes the file look like it's only the size of the non-sparse data on it.

There is, amazingly, a whole field of research dedicated to this.
And what are the chances of having this incorporated in to PearPC? So far, making a 10gb PearPC imageand having Windows automatically compress it seems the closest that I can get to that.
May be make a bzip2 or gzip image that will automatically be written/read when it is needed?
User avatar
phirkel
Apple Corer
Posts: 237
Joined: Thu Feb 27, 2003 10:09 pm

Post by phirkel »

willhart wrote:
phirkel wrote:
PPC_Digger wrote: Virtual PC simply 'knows' when the virtual machine writes to the virtual hard drive, so it begins with a very small file, and writes to it only when needed. If I am not mistaken, such files are called sparse files.
Close but no cigar.

Sparse files are files that have a defined size (say 6gb), however, they contain the same data, over and over again. So, the filesystem (usually something journaled, like HFS+J or ReiserFS/Ext3/JFS/XFS) transparently makes the file look like it's only the size of the non-sparse data on it.

There is, amazingly, a whole field of research dedicated to this.
And what are the chances of having this incorporated in to PearPC? So far, making a 10gb PearPC imageand having Windows automatically compress it seems the closest that I can get to that.

Gah, reread my post please. The host filesystem, be it NTFS (to a lesser extent, if I recall correctly), ReiserFS, etc... will always make the file use less space that it is slated to use. It has nothing to do with PearPC and everything to do with the host filesystem.
Post Reply