mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
CODE128: Add minimal encodation algorithm (non-extended ASCII only)
from ZXing (props Alex Geller) - about 25-60% slower depending on data & stack heavy but does improve some outcomes when FNC1s present (GS1_MODE or manual) although not much else it appears (the previous algorithm was very good), but has a logical clarity the other lacked - funcs `c128_dxsmooth()` etc shared with CODE16K now moved there and renamed as `c16k_`; also fix extended char latching when exactly 4 extended chars at end also manual code set switching now honoured exactly even if immediate shift required; manual: make explicit that AI "(00)" and "(01)" prefixes added by Zint are HRT-only general: add `extern "C"` wrappers to a few header files
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/* tif_lzw.h - LZW compression for TIFF */
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2021-2022 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2021-2024 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -33,6 +33,10 @@
|
||||
#ifndef Z_TIF_LZW_H
|
||||
#define Z_TIF_LZW_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Adapted from TIFF Library 4.2.0 libtiff/tif_lzw.c */
|
||||
/*
|
||||
@ -370,5 +374,9 @@ static void tif_lzw_init(tif_lzw_state *sp) {
|
||||
sp->enc_hashtab = NULL;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
#endif /* Z_TIF_LZW_H */
|
||||
|
Reference in New Issue
Block a user