Code example for Deflater

Methods: setLevel

0
        		FileOutputStream logfy = new FileOutputStream(logfy0);
        		BufferedOutputStream logfw = new BufferedOutputStream(logfy);
        		GZIPOutputStream zos = new GZIPOutputStream(logfw)
        		{ 
        		    { 
        		        def.setLevel(Deflater.BEST_COMPRESSION);
        		    } 
        		}; 
        		//zos.setLevel(BEST_COMPRESSION); 
        		// Keep listening to the InputStream while connected 
        		int rxblocks = 0;
 
        		while (true) { 
        			try { 
        				// Read from the InputStream 
        				bytes = mmInStream.read(buffer);
        				if( bytes > 0 ) {
        					zos.write(buffer, 0, bytes);  
        					mEmulatorView.write(buffer, bytes);
        					if( rxblocks++ > 5000 ) {
        						// push the data through every 5000 blocks