Hi, This is my first time posting anything to github, so go easy on me, but I'd like to help :). Since block size seems to be an important issue at the moment, I was wondering if the following would help.
A potential place to save space would be to look into stop bit encoding for variable length integers that have a higher frequency of being larger than 0xfd. Stop bit encoding works by using the 8th bit of each byte as a flag that you've reached the last byte of the integer data (so 7 bits of each byte is used for the integer data). This is really nice as once you get out pass 0xfd the var_int encoding seems rather inefficient, unless you fill the entire int16, int32, or int64. For instance if the value to be encoded is 0xfe, var_int will use 3 bytes, while stop bit will only require 2 bytes. Both have a storage space of 3 bytes for full 16bit integers, 5 bytes for full 32bit integers, and 9 bytes for full 64bit integers. FIX/FAST protocol makes use of stop bit encoding for integer compression, if you'd like a reference. The nice thing about var_int is how much space it saves for values up to 0xfd, so that's why I'd think stop bit encoding would only be helpful for values which tend to normally be larger in size than 0xfd.
Another place I could imagine using a compression scheme like stop bit encoding would be for the "lock_time" field. I'm not sure how often this field is used, but I could imagine if it's not used very frequently we are wasting 3 extra Bytes per transaction for nothing. There also seems to be an issue once the block number is larger than 500000000. What I would purpose instead is creating a single byte called "tx_opt" which is used as bit flags for turning on or off fields within the transaction. Two of the option bits could be used to signal the presence of either a "lock_block" field or a "lock_time" field. If neither flags are set then the transaction ends after the last read "tx_out". This saves at most 3 bytes from the transaction data when a lock_time or lock_block are not used. It also provides some flag space for further uses later on within each transaction. I was also noticing that many transactions tend to have only 1 input and 1 output, which if this is common enough, we could perhaps have a flag or two that set weather the "tx_in count" or "tx_out count" are specified (the default value if they are not included being 1).
I would also recommend doing something similar with the "sequence" field in the "tx_in" format, if applicable, as this reads like it is more of an optional field than a required field so it might make more sense to have another "tx_in_opt" field which uses a bit flag to signal the presence of the "sequence" field.
I hope these ideas are useful. I would like to contribute to bitcoin core more, but first I have to spend some time learning how github works.
Brandon