bfg-repo-cleaner icon indicating copy to clipboard operation
bfg-repo-cleaner copied to clipboard

Problem Replacing Text in Binary Files (or files with few line-feeds)

Open phreed opened this issue 2 years ago • 0 comments

This is related to PR #168 The #168, multi-line regex solution, could cause problems when opening large files.

This problem exists even without multi-line regex.

Suppose, a large file is present which contains no 'newline' characters? Then a line is the whole file. This problem can be addressed, see https://gitlab.com/babeloff/bbex, by chunking the file into appropriate blocks. In the default case, the blocks are delimited by 'newline' characters. If you are interested I could probably write a PR to address this (very rare) bug.

It would provide the multi-line regex feature as a side-effect.

phreed avatar Apr 01 '22 21:04 phreed