Pardon the tangent, but..
I have the following scenario:
Created a level file composed by bytes:
1 2
| byte[] levels = { 72, 116, -15, 7, 60, -31, -123, 74, 46, 109 ... (I have 255 bytes) |
That code takes up a whole bunch of space, as it gets converted into something like this:
1 2 3 4 5 6
| byte[] levels = new byte[255]; levels[0] = 72; levels[1] = 116; levels[2] = -15; levels[3] = 7; [...] |
My version of javac turns each of those assignments into
1 2 3 4
| dup bipush 7 bipush 74 bastore |
That's six bytes of (uncompressed) class file per byte in the array, or 1530 bytes for a 255 entry byte array.
(Actually, the first six entries only take up five bytes each thanks to iconst_n)
This would all probably compress really well, but I thought you'd probably want to know anyway.