I know Rythal and the other devs aren't fond of packing libraries into the code, but in this case, perhaps using
LibCompress might be a good idea.
It has been ages since I used Carbonite, certainly before it was broken down into modules. If the Warehouse also keeps a snapshot of the guild bank, using
LibGuildBankComm-1.0 might also be recommended. LGBC-1 does embed LibCompress, but if you want to use LC's API, it would be best to load it standalone.