Increasing File Size


by anahata
Tags: file size, file system
anahata
anahata is offline
#1
Jan19-10, 02:54 PM
P: 2
Anyone know how to increase the size of a file, without actually increasing the space occupied on disk. I knew a guy who did this.
Phys.Org News Partner Science news on Phys.org
Review: With Galaxy S5, Samsung proves less can be more
Making graphene in your kitchen
Study casts doubt on climate benefit of biofuels from corn residue
DaveC426913
DaveC426913 is offline
#2
Jan19-10, 02:59 PM
DaveC426913's Avatar
P: 15,325
Quote Quote by anahata View Post
Anyone know how to increase the size of a file, without actually increasing the space occupied on disk. I knew a guy who did this.
Compression?

If you started with a 100K file, you could compress it (say, using zip) to, say, 1/10th its uncompressed size. This means you could increase the original file to 1M, then compress it so that it still took up only 100K on disk.
anahata
anahata is offline
#3
Jan19-10, 03:06 PM
P: 2
What it comes to be like this,
say the file size is 200kb, he somehow made the file size attribute ,say 2MB without changing the space on disk, ie, it still costs just 200kb disk space, but for all other purposes it acts like a 2MB file.
For example, wen uploading the file etc, it the properties will be displayed as 2MB.

story645
story645 is offline
#4
Jan19-10, 04:59 PM
P: 670

Increasing File Size


Quote Quote by anahata View Post
say the file size is 200kb, he somehow made the file size attribute ,say 2MB
Um, are you sure it wasn't a 2000kb file (which is a 2MB file?)

Google says the answer is to either create sparse files or do a compression trick.
dE_logics
dE_logics is offline
#5
Jan20-10, 08:28 AM
P: 730
Quote Quote by anahata View Post
What it comes to be like this,
say the file size is 200kb, he somehow made the file size attribute ,say 2MB without changing the space on disk, ie, it still costs just 200kb disk space, but for all other purposes it acts like a 2MB file.
For example, wen uploading the file etc, it the properties will be displayed as 2MB.
It happens in NTFS file system (not sure if this feature is available a Linux file system...need to check that out). It has a feature to compress the files in real time demoting it's already demoted performance in some systems.

Cause of this the "size of file" and "size of file on disk" are different.

But your friend did something opposite. I think this might be possible by tampering the default MFT.
Borek
Borek is offline
#6
Jan20-10, 09:09 AM
Admin
Borek's Avatar
P: 22,683
No idea about NTFS, but on FAT each file is described by an entry in directory table - one of the fields there is the file size. Modify just these four bytes and file will be reported as larger (or smaller) then it is in reality. It can't be done on the OS level, but any disk editing software able to deal with the disk on the sector level will do.


Register to reply

Related Discussions
increasing the spot size General Physics 6
Increasing Row Size.... Precalculus Mathematics Homework 2
What's the fastest way to increase file size? Programming & Computer Science 11
File Size Q... Forum Feedback & Announcements 12