...See here: https://github.com/ziplet/ziplet
A J2EE servlet filter which compresses data written to the response. It supports several algorithms (gzip, deflate, etc.) and emphasizes minimal memory usage and high throughput. Also provides detailed performance stats.
Feel free to fork pjl-comp-filter on Github: https://github.com/ziplet/ziplet
ciperf is used to calculate the -b and -l values for iperf in order to produce a chosen udp packet throughput (overhead = 51 bytes) in respect to some variables which may change the calculation of the parameters (e.g. computers, links, ...).