Archived
vq= is the one codebook path that reads a file; table= caps its values at 4096 but vq= appended every line to a growing vector and checked the count only after reading the whole file, so a 10 GB codebook grew 10 GB of vector before anything said no. And its "# unit X" line parsed X with sscanf %lf -- which accepts "inf" -- while the fallback guard was !(unit > 0.0), an infinity passes. A "# unit inf" file set every decoded value to infinity. The count is now checked as rows append, at 4096: the widest code the grid emits is u12, so past 4096 codewords could not be indexed even with the memory read, and the old code silently mis-indexed the over-4095 case itself. And only a finite positive names a unit -- "inf" and "nan" fall back to the entries' own rms, as a malformed value already did. A quant_test case pins the 4096/4097 boundary and that "# unit inf" now decodes finite.