GithubHelp home page GithubHelp logo

Comments (6)

AlexanderOMara avatar AlexanderOMara commented on June 24, 2024

Looks like the two DMG files are also signed on different days (check with codesign -vvd Bit.Slice.dmg). No idea why.

When I copy the apps out, I see different xattrs on the app (check with xattr -x -l 'Bit Slicer.app'), which might account for the difference in archive size if the xattrs/resource-fork are archived. Again, no idea why they differ.

The actual app and all the data forks on all the files appear to be the same.

from bit-slicer.

tinyapps avatar tinyapps commented on June 24, 2024

Thank you very much for your fast reply, AlexanderOMara.

Does the Finder ignore xattrs when reporting file size? "Bit Slicer.app" from both DMG files are reported as being 65,077,929 bytes. But the slight difference in xattr data cannot account even for the slight discrepancy in archive sizes.

from bit-slicer.

zorgiepoo avatar zorgiepoo commented on June 24, 2024

They are compressed differently (you can tell if you use the file command on the archives). The one on my website uses lzfse / APFS and the one on GitHub uses bzip2 / APFS. I forgot to update the one on GitHub, so I will probably do that soon and leave this issue open for that. bzip2 is more of a "deprecated" compression method; while it has a smaller file size, decompression speed is generally significantly slower. To use LZMA (smaller but slower than lzfse) would require me shipping to only macOS 10.15+ users (it is significantly better than bzip2 but not always a better trade-off over lzfse). Differences in extended attributes are unfortunately incidental.

from bit-slicer.

tinyapps avatar tinyapps commented on June 24, 2024

Thanks so much for the explanation, zorgiepoo.

Especially appreciate the tip about using file to find the different compression algorithms - neat!

I'm still puzzled about the second question; how two seemingly-identical app directories (down to the last byte!) can generate two differently-sized archives using the same technique. But of course that is probably a question for a different forum - sorry to trouble you!

from bit-slicer.

zorgiepoo avatar zorgiepoo commented on June 24, 2024

And yet, creating an uncompressed tar archive or a compressed zip archive of the identical "Bit Slicer.app" directories results in slightly different file sizes (68535808 vs. 68492288 bytes and 20655340 vs. 20616000 respectively); the same test on other Internet-downloaded apps did not display this anomaly

Try creating the archives by passing flags that do not preserve any extended attributes (xattrs) or other metadata. Metadata like extended attributes can easily be added or differ for a number of reasons.

If I Get Info on the two app bundles in Finder inside the different disk images, they are reported to be both 65,077,929 bytes.

(file doesn't tell you what filesystem the disk image is formatted as, but you can tell if you diskutil list after you mount a dmg).

I don't use it, but if you want to know something else neat, but apfs / HFS+ also support compression on the filesystem level. If you make a copy of the app using ditto --hfsCompression for example, you will see the copy takes up significantly less space on disk with the compression being tucked into hidden extended attributes. I think apps installed from the App Store usually use this type of compression.

from bit-slicer.

tinyapps avatar tinyapps commented on June 24, 2024

Thank you for that pointer, zorgiepoo.

The tar man page listed four promising options: --no-acls, --no-fflags, --no-mac-metadata, and --no-xattrs.

After a bit of trial and error, I found that identical tar archives could be produced by combining --no-xattrs and --no-mac-metadata (despite the tar man page stating that --no-mac-metadata was for "x mode only"), so long as I did not change the app filenames before archiving.

Thanks also for the note on filesystem compression - had more or less forgotten about it since the DriveSpace era ;-)

from bit-slicer.

Related Issues (20)

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.