if (graph) {
serializer = new GraphSerializer(serializer);
}
if (compression != null) {
if (CompressionType.GZIP.equals(compression)) {
serializer = new GZIPSerializer(serializer);
} else if (CompressionType.ZIP.equals(compression)) {
serializer = new ZIPSerializer(serializer);
}
}
}