Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Android Unzip the ZIP / GZIP data (based on the InflaterInputStream implementation)     - Windows Ubuntu dual system a key Ghost, grub rescue prompt solution (Linux)

- How to set cache valid time in Apache (Server)

- Detailed usage history command (Linux)

- List Leaves (Programming)

- ASP.NET 5 tutorial series (Server)

- Notebook computer forget password solution (Linux)

- Java String type time compare the size (Programming)

- Solve ORA-01012: not logged on (Database)

- Sublime Text Add instructions to insert the current time zone (Linux)

- After Oracle 11g dataguard failover rebuild the archive logs are not applied to be NO problem (Database)

- VMware virtual machine operating system log Error in the RPC receive loop resolve (Linux)

- CentOS 6.5 start ActiveMQ being given to solve (Server)

- How to remove the Linux memory Cache, Buffer and swap space (Linux)

- Java interface (Programming)

- Linux find command to find files (Linux)

- Linux system security configuration (Linux)

- Shell script to delete empty folders recursively (Linux)

- How do you prevent other users from accessing your home directory in Linux (Linux)

- Three methods easy data encryption on Linux (Linux)

- Linux input and output redirection (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:      
 
- CentOS 6/7 Series Docker Installation (Linux)
- IntelliJ IDEA run in Mac10.9 and JDK7 environment (Linux)
- Ubuntu install OpenMPI (Linux)
- MySQL master recovery from failure using binlog (Database)
- Linux Getting Started tutorial: 3D effects and beautify your desktop (Linux)
- High-performance JavaScript loaded and executed (Programming)
- Ubuntu font settings: Using Windows Font (Linux)
- Java class HashSet (Programming)
- Offline (local) Yum source structures (Linux)
- Linux system last command usage (Linux)
- Linux, security encryption to transfer files between machines (Linux)
- Linux signal and orphans, and zombie process (Programming)
- Ordinary users how to use the firewall software (Linux)
- Linux host dual LAN transceiver package ARP problem (Linux)
- Java, hashcode, equals and == (Programming)
- Proxmox VE implement KVM OpenVZ virtualization cloud computing (Server)
- Oracle multi-table query optimization (Database)
- Linux garbled file delete method (Linux)
- The user how to install Notepadqq 0.41.0 under ubuntu and debian (Linux)
- To install Docker under Ubuntu 15.04 (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.