In versions of macOS up until 10.4 the
zip command did not support resource forks. So
in order to zip up folders properly, you were meant to use
ditto -c -k -X --rsrc some_folder some_folder.zip
Which is what the Finder uses to create archives, too.
Times have changed slightly. The standard
zip now does support resource forks and copying resource forks is now the default behavior for
ditto. If you want to avoid copying the additional metadata
--norsrc is your friend.
--rsrc Preserve resource forks and HFS meta-data. ditto will store this data in Carbon-compatible ._ AppleDouble files on filesystems that do not natively support resource forks. As of Mac OS X 10.4, --rsrc is default behavior. --norsrc Do not preserve resource forks and HFS meta-data. If both --norsrc and --rsrc are passed, whichever is passed last will take precedence. Both options override DITTONORSRC. Unless explicitly specified, --norsrc also implies --noextattr and --noacl to match the behavior of Mac OS X 10.4.