Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Android Unzip the ZIP / GZIP data (based on the InflaterInputStream implementation)     - Binary tree and some basic operations with binary list (Programming)

- Disable unnecessary services under Linux (Linux)

- Graphic Git (Linux)

- MySQL database master never solve the synchronization method (Database)

- Ubuntu 12.04 install RTL8723BE wireless network card driver (Programming)

- Using monitoring tool dsniff (Linux)

- Sudo and Root Account in Ubuntu related (Linux)

- CentOS 6.6 x64 Oracle Database 11gR2 RAC automated installation scripts (Database)

- MySQL multi-master-slave synchronization (Database)

- Deep understanding of C # generics (Programming)

- Read and write files efficiently from Apache Kafka (Server)

- xCAT deployment (Linux)

- Shell for loop (Programming)

- The PostgreSQL database pg_dump command line does not enter a password method (Database)

- How to configure HTTP Strict Transport Security (HSTS) (Linux)

- Linux password file security issues detailed usage (Linux)

- Linux firewall security (Linux)

- What have we learn from the front-end application Nodejs (Programming)

- Linux Command Line Art (Linux)

- Configure the Linux kernel and use iptables to do port mapping (Linux)

 
         
  Android Unzip the ZIP / GZIP data (based on the InflaterInputStream implementation)
     
  Add Date : 2017-08-31      
         
       
         
  In the actual use of the project code, found that if the standard library with the Java library specified GZIPInputStream read compressed data decompression can not be stable, for unknown reasons. Instead, use InflaterInputStream can replace GZIPInputStream stable, normal work, and now the InflaterInputStream based on the zip \ gzip codec code tool method is given:

Public static byte [] decompress (byte [] compress) throws Exception {
   ByteArrayInputStream bais = new ByteArrayInputStream (compress);
   InflaterInputStream iis = new InflaterInputStream (bais);

   ByteArrayOutputStream baos = new ByteArrayOutputStream ();

   Int c = 0;
   Byte [] buf = new byte [BUFFER_SIZE];
   While (true) {
    C = iis.read (buf);

    If (c == EOF)
     Break;

    Baos.write (buf, 0, c);
   }}

   Baos.flush ();

   Return baos.toByteArray ();
  }}

Where, EOF = -1, BUFFER_SIZE value can be customized according to their own projects.
     
         
       
         
  More:      
 
- C language macro definition #define Usage (Programming)
- Ubuntu 14.04 install the NVIDIA driver + CUDA + MATLAB (Linux)
- After restarting network services, DNS address failure (Linux)
- CentOS yum source as the default setting methods in DVD (Linux)
- Use exp exported EXP-00091 error (Database)
- C ++ Fundamentals study notes (Programming)
- APR for Tomcat installation under Linux (Server)
- Vim copy and paste register (Linux)
- Phoenix agents use P2P WebRTC development (Programming)
- Prevent security threats caused Rootkit (Linux)
- Use a soft Raid play multiple SSD hard drive performance and enhance data security (Linux)
- JavaScript common array manipulation functions and usage (Programming)
- 10 useful Linux command Interview Questions and Answers (Linux)
- Binary tree traversal: the first sequence in order preorder recursive and non-recursive and traversal sequence (Programming)
- Intel Graphics Installer 1.0.3 released, support for Ubuntu (Linux)
- PXE install CentOS 6.4 (Linux)
- An Example of GoldenGate Extract Process Hang Problem Solving (Database)
- PostgreSQL 9.4.3 Installation and Configuration under CentOS 6.5 (Database)
- MySQL database under Linux to achieve automatic backup scheduled backup day (Database)
- ORA-00020: No more process state objects available (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.