Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ZIP (file format)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Implementation == There are numerous {{mono|.ZIP}} tools available, and numerous {{mono|.ZIP}} libraries for various programming environments; licenses used include [[proprietary software|proprietary]] and [[free software]]. [[WinZip]], [[WinRAR]], [[Info-ZIP]], [[ZipGenius]], [[7-Zip]], [[PeaZip]] and [[B1 Free Archiver]] are well-known {{mono|.ZIP}} tools, available on various platforms. Some of those tools have library or programmatic interfaces. Some development libraries licensed under open source agreement are [[libzip]], [[libarchive]], and [[Info-ZIP]]. For Java: [[Java Platform, Standard Edition]] contains the package "java.util.zip" to handle standard {{mono|.ZIP}} files; the Zip64File library specifically supports large files (larger than 4 GB) and treats {{mono|.ZIP}} files using random access; and the [[Apache Ant]] tool contains a more complete implementation released under the [[Apache Software License]]. The [[Info-ZIP]] implementations of the {{mono|.ZIP}} format adds support for Unix filesystem features, such as user and group IDs, file permissions, and support for symbolic links. The [[Apache Ant]] implementation is aware of these to the extent that it can create files with predefined Unix permissions. The Info-ZIP implementations also know how to use the error correction capabilities built into the {{mono|.ZIP}} compression format. Some programs do not, and will fail on a file that has errors. The Info-ZIP Windows tools also support [[NTFS]] [[filesystem]] permissions, and will make an attempt to translate from NTFS permissions to Unix permissions or vice versa when extracting files. This can result in potentially unintended combinations, e.g. [[.exe]] files being created on NTFS volumes with executable permission denied. Versions of Microsoft Windows have included support for {{mono|.ZIP}} compression in Explorer since the [[Microsoft Plus!]] pack was released for Windows 98. Microsoft calls this feature "Compressed Folders". Not all {{mono|.ZIP}} features are supported by the Windows Compressed Folders capability. For example, encryption is not supported in Windows 10 Home edition,<ref>{{cite web |last1=Maham Mukhtar |title=2 Ways To Fix "Encrypt Contents To Secure Data" Option Grayed Out In Windows 10 |url=https://www.itechtics.com/encrypt-contents-to-secure-data-option-grayed-out-fix/ |website=iTechtics |date=Aug 2017 |quote=EFS is available for all editions of Windows 10 except Windows 10 Home edition.}}</ref> although it can decrypt. Unicode entry encoding is not supported until [[Windows 7]], while split and spanned archives are not readable or writable by the Compressed Folders feature, nor is AES Encryption supported.<ref>{{cite web|url=https://devblogs.microsoft.com/oldnewthing/20180515-00/?p=98755|title=Why is Windows Compressed Folders (Zip folders) support stuck at the turn of the century?|date=15 May 2018}}</ref> Windows .zip support stemmed from an acquisition of "VisualZip" written by [[Dave Plummer]].<ref>{{cite news |author1=Christopher Harper |title=Adding ZIP file support to Windows 30 years ago almost got the creator of Task Manager fired |url=https://www.tomshardware.com/software/windows/adding-zip-file-support-to-windows-30-years-ago-almost-got-the-creator-of-task-manager-fired |access-date=6 May 2024 |work=Tom's Hardware |date=20 April 2024 |language=en}}</ref><ref>{{cite web |author1=Dave Plummer |author1-link=Dave Plummer |title=06.Secret History of Windows ZIPFolders |url=https://www.youtube.com/watch?v=aQUtUQ_L8Yk |publisher=[[YouTube]] |access-date=6 May 2024 |language=en |date=Jan 8, 2021}}</ref><ref>{{cite web |author1=Dave Plummer |author1-link=Dave Plummer |title=How Creating ZIPFolders for Windows almost got me FIRED from Microsoft! |url=https://www.youtube.com/watch?v=4j0yI41e0j4 |publisher=[[YouTube]] |access-date=6 May 2024 |language=en |date=April 17, 2024}}</ref> [[OpenDocument]] Format (ODF) started using the zip archive format in 2005, ODF is an open format for office documents of all types, this is the default file format used in [[Collabora Online]], [[LibreOffice]] and others.<ref>{{Cite web |last=Hall |first=Jim |date=15 Aug 2022 |title=How ODT files are structured |url=https://opensource.com/article/22/8/odt-files |access-date=9 July 2023 |website=opensource.com}}</ref> Microsoft Office started using the zip archive format in 2006 for their [[Office Open XML]] .docx, .xlsx, .pptx, etc. files, which became the default file format with [[Microsoft Office 2007]]. === Internationalization issues === Versions of the format prior to 6.3.0 did not support storing file names in [[Unicode]].<ref name=":0">{{Cite web|url=https://pkwaredownloads.blob.core.windows.net/pkware-general/Documentation/APPNOTE-6.3.9.TXT|title=APPNOTE.TXT - .ZIP File Format Specification|language=en|author=PKWARE|website=PKWARE|date=July 15, 2020}}</ref> According to the standard,<ref name=":0" /> file names should be stored in the [[CP437]] encoding, which is standard for the [[IBM PC]],<ref name=":0" /> but in practice, [[DOS]] archivers used the system's installed [[character encoding]]. The built-in archiver of Windows up to 11 also used the DOS encoding corresponding to the selected system language for backward compatibility when creating archives. Subsequently, the standard was updated to include two options for storing file names in Unicode: 1) when the 11th bit in the General purpose bit flag field is set, the file name in the "File name" field of the header should be considered as [[UTF-8]] rather than a single-byte encoding, and 2) the Unicode Path Extra Field was added to store the file name in UTF-8 encoding.<ref name=":0" /> Some versions of archivers on the Windows platform have also used ANSI encoding in the past. Thus, to correctly extract files with names containing non-English characters, it is necessary:<ref name="auto">{{Cite web|url=https://git.launchpad.net/ubuntu/+source/unzip/commit/?id=8d0362fcc3761dc75fe42de312eb5a067533f68d|title=ubuntu/+source/unzip - [no description]|website=git.launchpad.net}}</ref> # Check for the presence of the Unicode Path Extra Field, and if it exists, use the filename from it, encoded in UTF-8. # Check for the presence of flag 11 in the General purpose bit flag field, and if it is set, consider the filename encoding in the "File name" field to be UTF-8. # If the "packing OS" field contains the value 11 (NTFS, Windows), and the "version of the packer" field value is greater than or equal to 20, consider the filename encoding in the "File name" field to be the ANSI (Windows) encoding corresponding to the system locale if one can be determined; otherwise, use CP437. # If the "packing OS" field contains the value 0 (FAT, DOS), and the "version of the packer" field value is between 25 and 40 inclusive, consider the filename encoding in the local header's "File name" field to be ANSI (Windows) encoding, and in the central header's "File name" field to be OEM (DOS) encoding, corresponding to the system locale if one can be determined; otherwise, use CP437. # In other cases, if the "OS packing" field contains the value 0 (FAT, DOS), 6 (HPFS, OS/2), or 11 (NTFS, Windows), consider the filename encoding in the "File name" field to be OEM (DOS) encoding, corresponding to the system locale if one can be determined; otherwise, use CP437. # In all other cases, consider the filename encoding in the "File name" field to be the system encoding of operating system unpacker is running on. Some implementations of zip unpackers did not implement this algorithm or only partially implemented it, as a result, when viewing the contents of an archive or extracting it, users saw a chaotic set of characters, known as "mojibake", instead of letters of the national alphabet. In 2016, this problem was solved in the [[FAR Manager#Linux, MacOS and BSD version|far2l]] file and archive manager for Linux, BSD and Mac.<ref>{{Cite web|url=https://github.com/elfmz/far2l/issues/114|title=error processing archives with non-english characters in the names of archived files/folders 路 Issue #114 路 elfmz/far2l|language=en|website=GitHub|access-date=2024-05-23}}</ref> In 2024, similar solution was added<ref name=":1">{{Cite web|url=https://salsa.debian.org/debian/7zip/-/merge_requests/8/diffs|title=Use system locale to select codepage for legacy zip archives (!8) 路 Merge requests 路 Debian / 7zip 路 GitLab|language=en|website=GitLab|date=2024-05-22|access-date=2024-05-23}}</ref> to the version of 7zip used in the [[Debian]] distribution and its derivatives, and to the version of unzip used in the [[Ubuntu]] distribution and its derivatives.<ref name="auto"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)