Skip to content

Add --byte-unit option#480

Closed
Goooler wants to merge 1 commit into
JakeWharton:trunkfrom
Goooler:byte-size-units
Closed

Add --byte-unit option#480
Goooler wants to merge 1 commit into
JakeWharton:trunkfrom
Goooler:byte-size-units

Conversation

@Goooler

@Goooler Goooler commented Mar 16, 2026

Copy link
Copy Markdown
Contributor
sh ~/IdeaProjects/diffuse/diffuse/build/install/diffuse/bin/diffuse diff --byte-unit decimal --summary-only old.apk new.apk

OLD: old.apk (signature: V2)
NEW: new.apk (signature: V2)

          │             compressed             │            uncompressed
          ├───────────┬───────────┬────────────┼───────────┬───────────┬────────────
 APK      │ old       │ new       │ diff       │ old       │ new       │ diff
──────────┼───────────┼───────────┼────────────┼───────────┼───────────┼────────────
      dex │   1.62 MB │    1.7 MB │  +80.17 KB │   3.27 MB │    3.4 MB │ +126.36 KB
     arsc │   1.78 MB │   1.91 MB │ +133.66 KB │   1.78 MB │   1.91 MB │ +133.66 KB
 manifest │   3.64 KB │   3.64 KB │       +2 B │  16.35 KB │  16.35 KB │        0 B
      res │   9.83 MB │  10.65 MB │ +826.28 KB │  23.27 MB │  25.43 MB │   +2.16 MB
   native │ 103.84 KB │ 107.24 KB │    +3.4 KB │  37.39 KB │  37.39 KB │        0 B
    asset │  52.74 KB │  53.02 KB │     +271 B │ 212.29 KB │ 222.13 KB │   +9.84 KB
    other │  49.05 KB │  48.03 KB │   -1.02 KB │  106.3 KB │ 106.86 KB │     +557 B
──────────┼───────────┼───────────┼────────────┼───────────┼───────────┼────────────
    total │  13.44 MB │  14.48 MB │   +1.04 MB │   28.7 MB │  31.12 MB │   +2.43 MB

 DEX     │ old   │ new   │ diff
─────────┼───────┼───────┼──────────────────────
   files │     1 │     1 │    0
 strings │ 14573 │ 14634 │  +61 (+3963 -3902)
   types │  4889 │  5021 │ +132 (+2832 -2700)
 classes │  4014 │  4122 │ +108 (+2686 -2578)
 methods │ 20139 │ 20965 │ +826 (+17701 -16875)
  fields │ 13961 │ 14270 │ +309 (+13746 -13437)

 ARSC    │ old   │ new   │ diff
─────────┼───────┼───────┼────────────────────
 configs │   149 │   148 │    -1 (+1 -2)
 entries │ 15735 │ 17224 │ +1489 (+1601 -112)

```
sh ~/IdeaProjects/diffuse/diffuse/build/install/diffuse/bin/diffuse diff --byte-unit decimal --summary-only old.apk new.apk

OLD: old.apk (signature: V2)
NEW: new.apk (signature: V2)

          │             compressed             │            uncompressed
          ├───────────┬───────────┬────────────┼───────────┬───────────┬────────────
 APK      │ old       │ new       │ diff       │ old       │ new       │ diff
──────────┼───────────┼───────────┼────────────┼───────────┼───────────┼────────────
      dex │   1.62 MB │    1.7 MB │  +80.17 KB │   3.27 MB │    3.4 MB │ +126.36 KB
     arsc │   1.78 MB │   1.91 MB │ +133.66 KB │   1.78 MB │   1.91 MB │ +133.66 KB
 manifest │   3.64 KB │   3.64 KB │       +2 B │  16.35 KB │  16.35 KB │        0 B
      res │   9.83 MB │  10.65 MB │ +826.28 KB │  23.27 MB │  25.43 MB │   +2.16 MB
   native │ 103.84 KB │ 107.24 KB │    +3.4 KB │  37.39 KB │  37.39 KB │        0 B
    asset │  52.74 KB │  53.02 KB │     +271 B │ 212.29 KB │ 222.13 KB │   +9.84 KB
    other │  49.05 KB │  48.03 KB │   -1.02 KB │  106.3 KB │ 106.86 KB │     +557 B
──────────┼───────────┼───────────┼────────────┼───────────┼───────────┼────────────
    total │  13.44 MB │  14.48 MB │   +1.04 MB │   28.7 MB │  31.12 MB │   +2.43 MB

 DEX     │ old   │ new   │ diff
─────────┼───────┼───────┼──────────────────────
   files │     1 │     1 │    0
 strings │ 14573 │ 14634 │  +61 (+3963 -3902)
   types │  4889 │  5021 │ +132 (+2832 -2700)
 classes │  4014 │  4122 │ +108 (+2686 -2578)
 methods │ 20139 │ 20965 │ +826 (+17701 -16875)
  fields │ 13961 │ 14270 │ +309 (+13746 -13437)

 ARSC    │ old   │ new   │ diff
─────────┼───────┼───────┼────────────────────
 configs │   149 │   148 │    -1 (+1 -2)
 entries │ 15735 │ 17224 │ +1489 (+1601 -112)
```
@JakeWharton

Copy link
Copy Markdown
Owner

Is there a strong motivation here? I hate wasting a character on the i as much as anybody else, but the decimal value is completely useless, right?

@Goooler

Goooler commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

No specific reason. I sent it here as byte-size supports it.

@JakeWharton

Copy link
Copy Markdown
Owner

Decimal is an abomination 😄

It's only supported so we can figure out WTF hard drive manufacturers are actually shipping in terms of usable space.

@Goooler Goooler deleted the byte-size-units branch March 16, 2026 03:40
@Goooler

Goooler commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

LOL🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants