Skip to content

Commit

Permalink
docs: explain info about the deprecated InputStream API
Browse files Browse the repository at this point in the history
  • Loading branch information
iyxan23 authored Aug 30, 2024
1 parent 53982f6 commit ea2e0df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FileOutputStream zipOut = ...;
ZipAlign.alignZip(zipIn, zipOut);
```

Additionaly, you could use a regular `InputStream`.
Additionaly, you could use a regular `InputStream` (caution: terribly slow)

```java
import com.iyxan23.zipalignjava.ZipAlign;
Expand All @@ -27,15 +27,21 @@ FileOutputStream zipOut = ...;
ZipAlign.alignZip(zipIn, zipOut);
```

> [!WARNING]
> The `InputStream` API is deprecated and is not supported anymore, it does not support aligning
> `.so` files and will not be.
Aligning .so files to 16KiB page boundaries is enabled by default, pass in a boolean to opt out:

```java
// only if zipIn is a RandomAccessFile
ZipAlign.alignZip(zipIn, zipOut, false);
```

Prefer to align .so files in a 4KiB page boundaries?

```java
// only if zipIn is a RandomAccessFile
ZipAlign.alignZip(zipIn, zipOut, 4, 4096);
```

Expand Down

0 comments on commit ea2e0df

Please sign in to comment.