-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BinaryFen in python-chess #1099
Comments
indeed, would be real nice to have. |
see also Disservin/chess-library#109 |
Here is my implementation in Python: https://github.com/Torom/BinaryFen_python/blob/main/BinaryFen.py It is definitely not perfect, pretty much a 1:1 conversion of Disservin's implementation. >>> sys.getsizeof(bytearray(24))
81
>>> sys.getsizeof(chess.Board().epd())
93 Edit: >>> sys.getsizeof(bytes(24))
57 |
I'd imagine that this will be most useful when serializing to disk, so despite the relatively large memory usage as per |
You introduced the efficient BinaryFen in this blog post on Lichess.
My question is whether it would be possible to implement this in python-chess. I guess python-chess is used by quite a few people to store a lot of positions (at least I do). For this it would be very helpful to be able to use the space-saving and reversible BinaryFen.
Thank you for this awesome library.
The text was updated successfully, but these errors were encountered: