Currently, BAM files are either selected manually when the file is initially checked in
bk new -b FILE (man ). Or they are selected automatically when a file is larger than the size of the BAM config (64k by default) and contains nulls which can’t be represented in the bk weave.
The change I have in mind is that in
slib.c:binaryCheck() in addition to looking for nulls we also look at the average line size. (size / newlines). If a file is larger than the currently configured min BAM file size and the average line size is like 2k or more then we switch to considering the file as a binary.
It would be a fairly small change to just that file.