Accname
2D-Graphics enthusiast
- Reaction score
- 1,457
Edit: Dang, what a typo in the title. It is of course: "File size is incomprehensible".
Hi guys.
I wanna save a class in java using the serialization process.
Now this class has a lot of data.
In fact, inside is a two dimensional array containing "short"'s.
Now this array is huge, it has 2048 * 2048 entries, each of which is a short (16 bit).
But when i saved it i sure didnt expect that file size. The file is 88mb in size on my hard drive.
Thats insane.
So i first checked everything else in the object:
i removed the two dimensional array, just for testing, and saved again. Its 200kb now.
But with the array its 88.something mb.
By my calculation it should be:
((((2048 * 2048) * 2) (since a short is 2 byte) / 1024) / 1024) == 8mb
So how comes its over ten times that amount?
Please, i really need your help here.
Hi guys.
I wanna save a class in java using the serialization process.
Now this class has a lot of data.
In fact, inside is a two dimensional array containing "short"'s.
Now this array is huge, it has 2048 * 2048 entries, each of which is a short (16 bit).
But when i saved it i sure didnt expect that file size. The file is 88mb in size on my hard drive.
Thats insane.
So i first checked everything else in the object:
i removed the two dimensional array, just for testing, and saved again. Its 200kb now.
But with the array its 88.something mb.
By my calculation it should be:
((((2048 * 2048) * 2) (since a short is 2 byte) / 1024) / 1024) == 8mb
So how comes its over ten times that amount?
Please, i really need your help here.