public static FSImageCompression readCompressionHeader ( Configuration conf , DataInputStream dis ) throws IOException { boolean isCompressed = dis . readBoolean ( ) ; if ( ! isCompressed ) { return createNoopCompression ( ) ; } else { String codecClassName = Text . readString ( dis ) ; return createCompression ( conf , codecClassName ) ; } }
Create a compression instance based on a header read from an input stream .