dev@fi.java.net

Tables and Encoding Algos

From: Alan Hudson <giles_at_yumetech.com>
Date: Fri, 25 Feb 2005 13:55:27 -0800

Looking at the startElement call on SAXDocumentSerializer.java, I notice
that if a value is added to the table its unencoded form is used.
Wouldn't it save space to use the algorithm encoded form? I found it
useful to have attributeValueSizeConstraint sizes up to 32 for X3D
files. So encoding these strings helped a fair bit.

The code:
                        value = eAtts.getValue(i);
                        if (value != null) {
                            addToTable = (value.length() <
_v.attributeValueSizeConstraint) ? true : false;
                            encodeNonIdentifyingStringOnFirstBit(value,
_v.attributeValue, addToTable);
                        } else {
                            
encodeNonIdentifyingStringOnFirstBit(eAtts.getAlgorithmURI(i),
                                    eAtts.getAlgorithmIndex(i),
eAtts.getAlgorithmData(i));
                        }