Code Monkey home page Code Monkey logo

zipalign-java's Introduction

zipalign-java

Zipalign implemented in java with 0 dependencies.

Note: I haven't implemented Zip64 handling yet, this might not work on a few apks.

How to use it?

Either you build a jar, import the gradle module, or just copy the classes.

Building a jar

To build a jar, run:

$ ./gradlew jar

and you'll have the built jar in the build/libs directory.

Using it as a library

You can use the jar as a library and directly access the ZipAlign class.

import com.iyxan23.zipalignjava.ZipAlign;

FileInputStream zipIn = ...;
FileOutputStream zipOut = ...;

ZipAlign.alignZip(zipIn, zipOut);
// hell yeah it's that easy!

NOTE: The library doesn't do anything to verify if the zip stream given is valid; it assumes everything is valid and skims through bytes. You might need to verify the zip file first.

Using it as a CLI program

or just run it as a cli program:

$ ls
unaligned.apk  zipalign-java-1.0.jar
$ java -jar zipalign-java-1.0.jar unaligned.apk aligned.apk
Aligning zip
Zip successfully aligned
$ ls
aligned.apk  unaligned.apk  zipalign-java-1.0.jar

Proof?

image

zipalign-java's People

Contributors

iyxan23 avatar pranavpurwar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.