This can be trivially compressed into $\lceil log_2(39) \rceil = 6$ bits per character, a 25% savings.
Additionally, since account IDs are limited to a max length of 64, we only need to store one byte for length. (This might break Borsh spec.)
Therefore, using only trivial compression, we should be able to optimize the binary representation of an implicit account ID from Borsh's 4 (length) + 64 (value) = 68 bytes to 1 (length) + 64 * .75 (value) = 49 bytes, almost 28% smaller.
The character set for NEAR Account IDs is 38 + 1 separator, so 39 distinct characters.
This can be trivially compressed into $\lceil log_2(39) \rceil = 6$ bits per character, a 25% savings.
Additionally, since account IDs are limited to a max length of 64, we only need to store one byte for length. (This might break Borsh spec.)
Therefore, using only trivial compression, we should be able to optimize the binary representation of an implicit account ID from Borsh's 4 (length) + 64 (value) = 68 bytes to 1 (length) + 64 * .75 (value) = 49 bytes, almost 28% smaller.