Content deleted Content added
fixed dashes using a script, date formats per MOS:DATEFORMAT by script |
No edit summary |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 1:
{{Short description|Compound document file format}}
{{Use dmy dates|date=December 2019}}
'''Compound File Binary Format''' (CFBF), also called '''Compound File''', '''Compound Document format''',<ref>{{cite web|url=http://poi.apache.org/poifs/index.html|title=Apache POI – POIFS|publisher=POI Project|accessdate=10 May 2011|archive-url=https://web.archive.org/web/20110426150340/http://poi.apache.org/poifs/index.html|archive-date=26 April 2011|url-status=dead}}</ref> or '''Composite Document File V2
|url=https://linuxconfig.org/how-to-convert-documents-between-libreoffice-and-microsoft-office-file-formats-on-linux
|title=
|accessdate=25 November 2016
|accessdate=25 November 2016}}</ref> (CDF), is a [[compound document|compound]] [[document file format]] for storing numerous files and streams within a single file on a disk. CFBF is developed by [[Microsoft]] and is an implementation of Microsoft [[COM Structured Storage]].<ref>{{cite web▼
|archive-url=https://web.archive.org/web/20190921163547/https://linuxconfig.org/how-to-convert-documents-between-libreoffice-and-microsoft-office-file-formats-on-linux
|archive-date=21 September 2019
|url-status=dead
▲
|url=http://msdn.microsoft.com/en-us/library/aa378938%28VS.85%29.aspx
|title=Compound Files (Windows)
|work=Microsoft Developers Network (MSDN) library – COM SDK|publisher=Microsoft Corporation|accessdate=23 September 2009|date=20 November 2008}}</ref><ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/ydd3k45e.aspx|title=Containers: Compound Files|work=Microsoft Developers Network (MSDN) library – Visual Studio 2008 documentation|publisher=Microsoft Corporation|accessdate=23 September 2009}}</ref><ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/cc542545%28VS.85%29.aspx|title=Understand Compound Files|work=Microsoft Developers Network (MSDN) library – ActiveDirectory Rights Management|accessdate=23 September 2009|date=25 June 2009}}</ref> The file format is used for storing storage objects and stream objects in a hierarchical structure within a single file.<ref>{{Cite web |date=2020-01-28 |title=Microsoft Compound File Binary File Format, Version 4 |url=https://www.loc.gov/preservation/digital/formats/fdd/fdd000392.shtml |access-date=2024-06-13 |website=www.loc.gov}}</ref>
Microsoft has opened the format for use by others and it is now used in a variety of programs from [[Microsoft Word]] and [[Microsoft Access]] to Business Objects.{{Citation needed|date=November 2009}} It also forms the basis of the [[Advanced Authoring Format]].<ref>[http://www.aafassociation.org AMW Association (formerly AAF Association)] {{webarchive|url=https://web.archive.org/web/20000815063147/http://www.aafassociation.org/ |date=15 August 2000 }}</ref>
Line 13 ⟶ 18:
At its simplest, the Compound File Binary Format is a container, with little restriction on what can be stored within it.
A CFBF file structure loosely resembles a [[File Allocation Table|FAT]] [[
==Structure==
The CFBF file consists of a 512-
There are several types of sector that may be present in a CFBF file:
* File Allocation Table (FAT) Sector – contains chains of sector indices much as a FAT does in the FAT/FAT32 filesystems
Line 30 ⟶ 34:
More detail is given below for the header and each sector type.
===CFBF
The CFBF
<
};
</syntaxhighlight>
===File Allocation Table (FAT)
When taken together as a single stream the collection of FAT sectors define the status and linkage of every sector in the file. Each entry in the FAT is 4 bytes in length and contains the sector number of the next sector in a FAT chain or one of the following special values:
* {{Mono|FREESECT}} ({{Mono|0xFFFFFFFF}}) – denotes an unused sector
* {{Mono|ENDOFCHAIN}} ({{Mono|0xFFFFFFFE}}) – marks the last sector in a FAT chain
* {{Mono|FATSECT}} ({{Mono|0xFFFFFFFD}}) – marks a sector used to store part of the FAT
* {{Mono|DIFSECT}} ({{Mono|0xFFFFFFFC}}) – marks a sector used to store part of the DIFAT
===Range Lock Sector===
{{Expand section|date=November 2009}}
The '''Range Lock Sector''' must exist in files greater than
===Glossary===
* ''FAT'' – File Allocation Table
* ''DIFAT'' – Double-Indirect File Allocation Table
* ''FAT Chain'' – a group of FAT entries which indicate the
* ''Stream'' – a virtual file which occupies a number of
* ''Sector'' – the unit of allocation within the CFBF, usually 512 or 4096 Bytes in length
==See also==
* [[COM
* [[Advanced Authoring Format
* [[Cabinet (file format)]]
|