public String compress(String compressorName, String uncompressedString) throws IOException {
    Checks.notNull(uncompressedString, "uncompressedString cannot be null");
    Compressor compressor =
        getCompressor(compressorName == null ? DEFAULT_COMPRESSOR_NAME : compressorName);
    return base64Encode(compressor.compress(uncompressedString.getBytes(DEFAULT_ENCODING)));
  }
@Test
  public void testCompress() throws IOException {
    assertEquals("H4sIAAAAAAAA/0tMBAMAdCCLWwcAAAA=", stringCodec.compress("gzip", "aaaaaaa"));
    assertEquals("H4sIAAAAAAAA/0tMBAMAdCCLWwcAAAA=", stringCodec.compress(null, "aaaaaaa"));
  }