Why Do File Sizes Vary So Much?

This is always a fun topic to look at. This is not the first or the last time I have been asked this and I thought it was a good one to cover here.

I was sent a DWG file from an Engineer containing 2D linework and Text only. At rest when not in use the DWG file is 2.9MB in size. If I open it in TBC and write it out as a DXF for Siteworks it bloats up to 4.9MB. If I open the DWG in AutoCAD and write the data out using wblock to a new DXF file that file is only 900k. It is always the same data so why does the file size range from 0.9MB to 5MB. And which is the best file to use in a controller.

Here is the detailed answer as to why the above happens

A DWG File is a Binary file vs a normal DXF which is Text - a binary version of something is significantly smaller than the ascii version of the same thing which is why your 2.9mb DWG becomes 5MB DXF.

The wblock DXF is actually a binary format of a DXF and that is why it is so much smaller - and when you wblock a file it does not carry a lot of the standard header overhead that is stored in a normal DXF or a DWG - so while it will move data around it is “less complete” from a data structure perspective than the native DXF or DWG format files.

At the end of the day the question falls into two parts - how big is the file that I add as an attachment to an email or put on dropbox for someone else to download for use - that can be better managed by zipping a DXF file if necessary because that will compress the file - if I zip the 5MB DXF it becomes 700kb so equivalent to your WBlock file because now it is Binary.

The second part is how big does it become in use in the field controller and to be honest I don’t think it matters if it is a wblock file or a normal DXF file or a DWG file (not that dwg is supported in the field), because the device turns the content of the DXF into objects in memory and they are the same objects so they will take up the same amount of memory - it is more a question of how big the file is at rest on the device when not in use - all computers have a finite capacity for storage and at some point they get full - for sure they will get full quicker when the files are not binary DXFs vs DXFs - I am not sure that the binary dxf will open in SIteworks - it probably will so the storage will be smaller with the wblock dxf than the ASCII DXF but that is the only benefit really. The actual objects in memory is the big iissue and there is little to no difference between them.

Hope that this explains the issues associated with file size.

Alan

2 Likes