rt 8,937 5,726 4,652 2,820 52% 81% 61% Java 1.2 runtime
While it would be possible to include debugging information in a wire-format, we would typically prefer to save space by excluding it. I do not encode the attributes LineNumberAttribute, LocalVariableTable nor SourceFile. Also, because my approach requires that we renumber entries in the constant pool, I exclude any unrecognized attributes (we would not be able to update references to the constant pool in unrecognized attributes).
I also exclude any non-class files (e.g., PNG image files) from archive in performing my size calculations. I report compression as the size of the compressed object, as a percentage of the size of the original object. To have a consistent and fair comparison of the size of my archive format with standard jar files, I performed the following transformations to the benchmarks I studied:
These changes typically give a 20% improvement in jar file size Sorting of the constant pool entries can give an improvement of several percent when the class file is compressed, because it enables zlib to do a better job of finding repeated patterns. In this paper, when I report the size of original and compressed class files, those sizes reflect the improvements gained by these transformations. Any improvements I report for the new techniques in this paper reflect improvements beyond those gained by removing debugging information and garbage collecting the constant pool.
I will often refer to gzip and zlib compression interchangeable. However, in most situations where I apply gzip compression I do not include the 18 bytes for the GZIP header and trailer.
rt 8,937 5,726 4,652 2,820 52% 81% 61% Java 1.2 runtime
While it would be possible to include debugging information in a wire-format, we would typically prefer to save space by excluding it. I do not encode the attributes LineNumberAttribute, LocalVariableTable nor SourceFile. Also, because my approach requires that we renumber entries in the constant pool, I exclude any unrecognized attributes (we would not be able to update references to the constant pool in unrecognized attributes).
I also exclude any non-class files (e.g., PNG image files) from archive in performing my size calculations. I report compression as the size of the compressed object, as a percentage of the size of the original object. To have a consistent and fair comparison of the size of my archive format with standard jar files, I performed the following transformations to the benchmarks I studied:
These changes typically give a 20% improvement in jar file size Sorting of the constant pool entries can give an improvement of several percent when the class file is compressed, because it enables zlib to do a better job of finding repeated patterns. In this paper, when I report the size of original and compressed class files, those sizes reflect the improvements gained by these transformations. Any improvements I report for the new techniques in this paper reflect improvements beyond those gained by removing debugging information and garbage collecting the constant pool.
I will often refer to gzip and zlib compression interchangeable. However, in most situations where I apply gzip compression I do not include the 18 bytes for the GZIP header and trailer.