Skip to content

Commit f98513e

Browse files
Update README.md
Clarify red-black tree limitations
1 parent 8b6f96b commit f98513e

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

README.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66

77
# OpenMcdf
88

9-
OpenMcdf is a fully .NET / C# library to manipulate [Compound File Binary File Format](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b) files, also known as [Structured Storage](https://learn.microsoft.com/en-us/windows/win32/stg/structured-storage-start-page).
9+
OpenMcdf is a fully .NET / C# library to manipulate [Compound File Binary File Format](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b)
10+
files, also known as [Structured Storage](https://learn.microsoft.com/en-us/windows/win32/stg/structured-storage-start-page).
1011

11-
Compound files include multiple streams of information (document summary, user data) in a single container, and is used as the bases for many different file formats:
12+
Compound files include multiple streams of information (document summary, user data) in a single container, and is used
13+
as the bases for many different file formats:
14+
- Advanced Authoring Format (.aaf)
1215
- Microsoft Office (.doc, .xls, .ppt)
13-
- Windows thumbnails cache files (thumbs.db)
1416
- Outlook messages (.msg)
15-
- Visual Studio Solution Options (.suo)
16-
- Advanced Authoring Format (.aaf)
17+
- Visual Studio Solution Options (.suo)
18+
- Windows thumbnails cache files (Thumbs.db)
1719

1820
OpenMcdf v3 has a rewritten API and supports:
1921
- An idiomatic dotnet API and exception hierarchy
@@ -23,9 +25,21 @@ OpenMcdf v3 has a rewritten API and supports:
2325
- Consolidation (i.e. reclamation of space by removing free sectors)
2426
- Nullable attributes
2527

26-
Limitations:
27-
- No support for red-black tree balancing (directory entries are stored in a tree, but are not balanced. i.e. trees are "all-black")
28+
## Limitations
29+
30+
- Limited error tolerance/recovery
2831
- No support for single writer, multiple readers
32+
- No support for red-black tree balancing
33+
34+
Directory entries are stored in a perfect binary tree where the entries are sorted but the tree is not balanced. i.e.
35+
the tree is "all-black", which is a valid red-black tree but has suboptimal performance for traversing large trees
36+
(though still considerably faster than some other clients).
37+
38+
Clients such as LibreOffice create trees with red-violations, which OpenMcdf is tolerant to reading and writing.
39+
Files with balanced red-black trees such as those created by Microsoft implementations will currently become unbalanced
40+
upon adding or removing directory entries. Fortunately, since other clients are also tolerant of trees that are either
41+
unbalanced or have red-violations, this should not be a major issue. The Wine implementation also has the same
42+
limitation.
2943

3044
## Getting started
3145

@@ -82,4 +96,6 @@ foreach (OleProperty prop in co.Properties)
8296
}
8397
```
8498

85-
OpenMcdf runs happily on the [Mono](http://www.mono-project.com/) platform and multi-targets [**netstandard2.0**](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0) and **net8.0** to maximize client compatibility and support modern dotnet features.
99+
OpenMcdf runs happily on the [Mono](http://www.mono-project.com/) platform and multi-targets
100+
[**netstandard2.0**](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0) and
101+
**net8.0** to maximize client compatibility and support modern dotnet features.

0 commit comments

Comments
 (0)