The following java snippets demonstrate how to establish a streaming connection to a Gnip PowerTrack or Firehose stream, using gzip compression. Note that both classes are required here in order to properly decompress the data as it comes through the connection, whether there is a high or low volume of activities being delivered.