I figured I might as well put the ideas I had into code and on github so others could help refine it, and if it turned out not to work that well was planning on attempting to implement gzip in javascript.
Incidentally in my unreliable data specific benchmarks using my algorithm + gzip resulted in smaller files than just gzip, but I'm not going to make that claim without more benchmarks. Hard to say if you can exploit http gzip compression and store the gzipped data on the server, whether the extra time using my algorithm as a pre-compressor would be worth any byte reduction achieved for that use case.
Also the current implementation is focused on compressing ascii characters into fewer ascii characters, it should be possible to implement a version that compresses bits into smaller bits and achieves better compression for use cases where you can compress to binary and ascii isn't a requirement.