libdmtx 0.7.8.7
libdmtx is a software library that enables programs to read and write Data Matrix barcodes of the modern ECC200 variety.
Loading...
Searching...
No Matches
dmtxencodebase256.c File Reference

libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton. More...

#include <assert.h>
#include "dmtx.h"
#include "dmtxstatic.h"

Go to the source code of this file.

Functions

static void encodeNextChunkBase256 (DmtxEncodeStream *stream)
 
static void appendValueBase256 (DmtxEncodeStream *stream, DmtxByte value)
 
static void completeIfDoneBase256 (DmtxEncodeStream *stream, int sizeIdxRequest)
 check remaining symbol capacity and remaining codewords if the chain can finish perfectly at the end of symbol data words there is a special one-byte length header value that can be used (i think ... read the spec again before commiting to anything)
 
static void updateBase256ChainHeader (DmtxEncodeStream *stream, int perfectSizeIdx)
 
static void base256OutputChainInsertFirst (DmtxEncodeStream *stream)
 insert element at beginning of chain, shifting all following elements forward by one used for binary length changes
 
static void base256OutputChainRemoveFirst (DmtxEncodeStream *stream)
 remove first element from chain, shifting all following elements back by one used for binary length changes end condition
 
static DmtxByte randomize255State (DmtxByte value, int position)
 Randomize 255 state.
 
static unsigned char unRandomize255State (unsigned char value, int idx)
 Unrandomize 255 state.
 

Detailed Description

libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton.

All rights reserved. Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved.

See LICENSE file in the main project directory for full terms of use and distribution.

Contact: Vadim A. Misbakh-Soloviov dmtx@.nosp@m.mva..nosp@m.name Mike Laughton mike@.nosp@m.drag.nosp@m.onfly.nosp@m.logi.nosp@m.c.com

Base 256 encoding rules

Definition in file dmtxencodebase256.c.

Function Documentation

◆ appendValueBase256()

static void appendValueBase256 ( DmtxEncodeStream * stream,
DmtxByte value )
static

Definition at line 55 of file dmtxencodebase256.c.

◆ base256OutputChainInsertFirst()

static void base256OutputChainInsertFirst ( DmtxEncodeStream * stream)
static

insert element at beginning of chain, shifting all following elements forward by one used for binary length changes

Definition at line 201 of file dmtxencodebase256.c.

◆ base256OutputChainRemoveFirst()

static void base256OutputChainRemoveFirst ( DmtxEncodeStream * stream)
static

remove first element from chain, shifting all following elements back by one used for binary length changes end condition

Definition at line 225 of file dmtxencodebase256.c.

◆ completeIfDoneBase256()

static void completeIfDoneBase256 ( DmtxEncodeStream * stream,
int sizeIdxRequest )
static

check remaining symbol capacity and remaining codewords if the chain can finish perfectly at the end of symbol data words there is a special one-byte length header value that can be used (i think ... read the spec again before commiting to anything)

Definition at line 73 of file dmtxencodebase256.c.

◆ encodeNextChunkBase256()

static void encodeNextChunkBase256 ( DmtxEncodeStream * stream)
static

Definition at line 26 of file dmtxencodebase256.c.

◆ randomize255State()

static DmtxByte randomize255State ( DmtxByte value,
int position )
static

Randomize 255 state.

Parameters
value
position
Returns
Randomized value

Definition at line 252 of file dmtxencodebase256.c.

◆ unRandomize255State()

static unsigned char unRandomize255State ( unsigned char value,
int idx )
static

Unrandomize 255 state.

Parameters
value
idx
Returns
Unrandomized value

Definition at line 268 of file dmtxencodebase256.c.

◆ updateBase256ChainHeader()

static void updateBase256ChainHeader ( DmtxEncodeStream * stream,
int perfectSizeIdx )
static

Definition at line 117 of file dmtxencodebase256.c.