Android Utililty Methods Zip Unzip Directory

List of utility methods to do Zip Unzip Directory

Description

The list of methods to do Zip Unzip Directory are organized into topic(s).

Method

voidzipDirectory(File directory, File zip)
zip Directory
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zip));
zip(directory, directory, zos);
zos.close();
voidzipDirectory(File directory, File zip)
zip Directory
fileLength = zip.length();
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zip));
zip(directory, directory, zos);
zos.close();
voidzipDirectory(File folder, String parentFolder, ZipOutputStream zos)
Adds a directory to the current zip output stream
for (File file : folder.listFiles()) {
    if (file.isDirectory()) {
        zipDirectory(file, parentFolder + "/" + file.getName(), zos);
        continue;
    zos.putNextEntry(new ZipEntry(parentFolder + "/"
            + file.getName()));
    BufferedInputStream bis = null;
...
Bitmapcompress(String filePath, int width, int height)
compress
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
Bitmap bitmap = BitmapFactory.decodeFile(filePath, options);
int bmpWidth = options.outWidth;
int bmpHeight = options.outHeight;
options.inJustDecodeBounds = false;
bitmap = BitmapFactory.decodeFile(filePath, options);
float scaleWidth = bmpWidth;
...
Stringcompress(String paramString)
compress
return new String(compress(paramString.getBytes("utf-8")), "utf-8");
voidcompress(String path)
compress
compress(path, true);
voidcompress(String path)
compress
compress(path, true);
voidcompress(String path, boolean delete)
compress
File file = new File(path);
compress(file, delete);
voidcompress(String path, boolean delete)
compress
File file = new File(path);
compress(file, delete);