1
0
mirror of https://github.com/pdewacht/brlaser synced 2024-12-27 07:48:21 +01:00

Don't compress across bands (#39)

This essentially re-introduces 7ed0d6f, but with a simpler
implementation. Some printers needed it after all.
This commit is contained in:
Peter De Wachter 2019-05-20 00:08:03 +02:00
parent ff68db0f93
commit 172c3bf87b

View File

@ -105,10 +105,12 @@ void job::encode_page(const page_params &page_params,
for (int i = 1; i < lines && nextline(line); ++i) { for (int i = 1; i < lines && nextline(line); ++i) {
std::vector<uint8_t> encoded = encode_line(line, reference); std::vector<uint8_t> encoded = encode_line(line, reference);
if (!block.line_fits(encoded.size())) { if (block.line_fits(encoded.size())) {
block.add_line(std::move(encoded));
} else {
block.flush(out_); block.flush(out_);
block.add_line(encode_line(line));
} }
block.add_line(std::move(encoded));
std::swap(line, reference); std::swap(line, reference);
} }