Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!hplabs!hp-sdd!megatek!spot!hollen From: hollen@spot.megatek.uucp (Dion Hollenbeck) Newsgroups: comp.sys.ibm.pc Subject: Re: confused: text files wastes space? How to correct it? Message-ID: <495@megatek.UUCP> Date: 16 Feb 89 16:14:18 GMT References: <4295@psuvax1.cs.psu.edu> Sender: news@megatek.UUCP Lines: 29 From article <4295@psuvax1.cs.psu.edu>, by deng@shire (Mingqi Deng): > While using NC and Norton utility programs, I found that disk spaces > were used very ineffeciently with ASCII files (nearly 40% wasted). > > [...stuff deleted...] > > I am confused. I know each sector is 512 (256? The real figure is not > very important here.) bytes in DOS 3.3 and any file whose size is not a > multiple of 512 bytes will leave last sector allocated for it to be > partially empty. But this only makes the space used increase by about > 500 bytes. My files are not just 200 bytes in size. That is why I am > puzzeled. > One factor you have not taken into account is allocation unit size. DOS does not allocate one sector at a time, but one allocation unit at at a time and depending on the size of the disk, the size of the allocation unit changes (the bigger the disk, the bigger the allocation unit) otherwise, the standard File Allocation Table would not be big enough to map large disks. Due to this scheme, a file containing only 1 byte could take up to 4096 bytes on a very large disk. Try increasing your file sizes by multiples of 512 and see when the next jump in actual size allocated happens and you should then know what the allocation unit size is on your disk. Dion Hollenbeck (619) 455-5590 x2814 Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121 seismo!s3sun!megatek!hollen ames!scubed/