canparse icon indicating copy to clipboard operation
canparse copied to clipboard

Added reading pgn library from binary

Open nurmukhametdaniyar opened this issue 3 years ago • 3 comments

Hey

I started using this library and encountered the problem where I need to read from buffer instead of reading from a file, so I added a small function to read from buffer

Hope it helps

nurmukhametdaniyar avatar Jan 03 '22 04:01 nurmukhametdaniyar

I was also able to avoid issue #24 after using reading from the buffer

nurmukhametdaniyar avatar Jan 03 '22 04:01 nurmukhametdaniyar

Thanks, I like this idea. I wonder if there's a way to generalize it to take a iterator of bytes, maybe using something like Bytes or something compatible with nom? That should help more constrained systems which might not have the ability to buffer the entire dbc. I'll take a look soon if someone doesn't beat me to it.

jmagnuson avatar Jan 07 '22 23:01 jmagnuson

Codecov Report

Merging #30 (2d71923) into master (116c4cd) will decrease coverage by 1.78%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
- Coverage   68.88%   67.09%   -1.79%     
==========================================
  Files           5        5              
  Lines         601      617      +16     
==========================================
  Hits          414      414              
- Misses        187      203      +16     
Impacted Files Coverage Δ
src/pgn.rs 62.89% <0.00%> (-3.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 116c4cd...2d71923. Read the comment docs.

codecov[bot] avatar Jan 07 '22 23:01 codecov[bot]