Sad Libs Mac OS
TL;DR When creating zip archives with SharpZipLib disable Zip64 format if you care about Mac compatibility.
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! Asking for help, clarification,. Jun 23, 2017 About the App. App name: ta-lib; App description: Tools for market analysis; App website: Not Available; Install the App. Press Command+Space and type Terminal and press enter/return key. Actually Mac OS X does have the concept of rpath. Previous to 10.4 there was only @executablepath which pointed to the location of the executable binary (as opposed to any dylibs that it loaded). @loaderpath was introduced in 10.4 which allowed dylibs to load dependencies based on their location (and not on the location of the executable. On my Mac, File C is now gone—I can’t see it anymore. The data on the SSD remains entirely unchanged though. File C’s data is still written to the same pages, and the only thing that’s different is that the operating system’s reference for where to find File C’s data has been deleted. Today I’m going to tell you a sad tale of a device called the Librem 5 and the company behind it, Purism.As of right now, this story does not have a happy ending. I am writing this series of articles as a protest against the behavior of Purism, a company which claims that transparency and openness are their core values.
Extra TL;DR [When creating zip archives with SharpZipLib make sure you set the file size][redux], disabling Zip64 is neither here nor there.
A project I am working on sources a zip archive from a Web service, extracts the XML file from the zip and then does silly amounts of processing of the data in that XML to produce a new XML file which is returned to the user.
But the sourced zip archive cannot be opened using [Python’s zipfile module][zipfile], and when saved on a Mac the archive cannot be opened using the built-in Archive Utility.app. If one double-clicks the zip, Archive Utility.app just compresses it again and sticks “.cpgz” on the end of the file name.
Fortunately the developer of the Web service is very helpful (the service is written in C# and runs on Windows) and although he didn’t know why Macs were having problems (the built-in Windows zip tool can handle the archive fine) he showed me the code that creates the zip file.
Turns out they were using [SharpZipLib, an open-source library for C#][sharpziplib]. And it turns out SharpZipLib creates archives using [Zip64 format][zip64] by default.
The fix was to disable Zip64 when creating the archive. Here’s a trivial command-line program that creates a zip and disables Zip64 for Mac compatibility:
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.Zip;
public class ZipTool
{
public static void Main(string[] args)
{
if (args.Length != 2) {
Console.WriteLine(“Usage: ziptool