initializing CompressionType type = kSnappyCompression;

to avoid  error: ‘type’ may be used uninitialized