Hi Fulvio
In https://sourceforge.net/p/scid/feature-requests/24/ you expressed your reluctance and caution to write code for cbh databases. I don't quite share it. Legally it seems perfectly fine to reverse engineer a file format for the purpose of interoperability. There are already different proprietary and free apps and tools which read the Chessbase .cbh file format and as far as I know, Chessbase hasn't acted against it.
Would you consider integrating the Cbh file format if someone else wrote the code? In fact I have already done so, see my add-cbh-codec branch. It works quite reliably, even though there is some cleanup work to do. The move decoding, which is the most difficult part, is tested with automatic tests. I followed the scidb-beta implementation relatively closely, making adjustments to Scid's data structures and methods where necessary. Chess960 games, which use a different encoding, are decoded successfully as well. This was missing in scidb-beta. There are some other minor improvements with respect to some changes and additions that Chessbase must have made after the scidb-beta implementatoin was written, and some other minor fixups. So it works fine with recent databases including the MegaBase 2026.
Performance-wise I can say that reading a .cbh database is quite a bit faster than cbh2si4 from scidb-beta. For example it takes a bit less than 3 minutes for reading the > 10 Million games from the MegaBase 2026 into memory on my convertible, whereas cbh2si4 would take more than an hour (and produces invalid dates without applying an additional patch). Still the idea is that large databases are converted by the user into the si5-format, which can be done conveniently once the .cbh database is loaded.
Hi Fulvio
In https://sourceforge.net/p/scid/feature-requests/24/ you expressed your reluctance and caution to write code for cbh databases. I don't quite share it. Legally it seems perfectly fine to reverse engineer a file format for the purpose of interoperability. There are already different proprietary and free apps and tools which read the Chessbase .cbh file format and as far as I know, Chessbase hasn't acted against it.
Would you consider integrating the Cbh file format if someone else wrote the code? In fact I have already done so, see my add-cbh-codec branch. It works quite reliably, even though there is some cleanup work to do. The move decoding, which is the most difficult part, is tested with automatic tests. I followed the scidb-beta implementation relatively closely, making adjustments to Scid's data structures and methods where necessary. Chess960 games, which use a different encoding, are decoded successfully as well. This was missing in scidb-beta. There are some other minor improvements with respect to some changes and additions that Chessbase must have made after the scidb-beta implementatoin was written, and some other minor fixups. So it works fine with recent databases including the MegaBase 2026.
Performance-wise I can say that reading a .cbh database is quite a bit faster than cbh2si4 from scidb-beta. For example it takes a bit less than 3 minutes for reading the > 10 Million games from the MegaBase 2026 into memory on my convertible, whereas cbh2si4 would take more than an hour (and produces invalid dates without applying an additional patch). Still the idea is that large databases are converted by the user into the si5-format, which can be done conveniently once the .cbh database is loaded.