What is XSBC? License How to Compile How to Use Comparison Tool Example Programs Simple Example SenderSimulation SAX Stream FEC AUV Workbench Binary Delivery Future Work Algorithm Documentation
This library has not reached 1.0 status. Until that time we will not maintain backwards compatibility between releases. We expect to make some more modifications to the core format before its final release. An approximate timeframe for the 1.0 release is Summer 2005.
FEC 1.0.3 is licensed under a BSD-style. Please read http://www.opensource.org/licenses/bsd-license.php for more information.
To compile the codebase you will need at least a Java 2 Standard Edition (J2SE) Development Kit (J2SDK) of 1.4, or better, and the latest Ant. Once you have Java, plus Ant, installed and added to your path then you can build XSBC. Open a console, go to the directory you installed the source and type:
ant
This will compile the codebase, create a jar, write the runapps*.bat/runapps*.sh files and generate the documentation.
The * is a place marker for either 1.4
or 1.5
indicating the JDK you prefer.
One common mistake using XSBC is processing XML documents which do not have a schema reference. The root element must contain a readable schema reference. Multi-namespace documents have not been implemented yet. Document Type Definitions (DTDs) without a corresponding XML schema are not supported, because, DTDs do not contain sufficient datatype and structure information for XSBC to perform effective compression.
<X3D profile="Immersive" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd"> <!-- document --> </X3D>
Build XSBC as instructed in the How to Compile section.
To run the comparison tool execute either the:
runapps*.bat (for Win) or runapps*.sh (for Unix)
files in the build directory. They are set by default to run the ComparisonTool from a MANIFEST-only jar file in the /lib1.4 directory that contains the main class:
org.web3d.xmsf.xsbc.apps.comparison.ComparisonTool
Open an XML file to be processed using the File / Open menu. Select which stages you'd like performed, the compression options and then hit the Process button. This will compress the XML file and report the resultant file sizes. Pressing the View button on a particular item will launch an external viewer to view the file.
The Compression Methods block is where you can decide how to compress the file.
The Fastest parsing option will binarily encode the file with no compression. This will result in some decrease in filesize (about 30-50%) and a significant increase in parsing speed.
The Compression, Non Lossy method will use non lossy techniques to compress the file.
The Compression, Lossy method will use lossy techniques to compress the file. These typically
center around quantizing floats. Currently this is hardcoded to using 16 bits instead of the
normal 32 bits to store floats. The next version of XSBC will allow you to specify
the parameters used for each attribute/element.
Another similar tool is provided in the Xj3D toolkit (www.xj3d.org) which shows how XSBC can be used to compress X3D files.
org.web3d.xmsf.xsbc.apps.SimpleExample
type:
ant launcher*
from a console and then execute the runapps*.* file for your system.
org.web3d.xmsf.xsbc.apps.SenderSimulation
type:
ant launcher*
from a console and then execute the runapps*.* file for your system.
Follow these steps to run SenderSimulation for each of the following circumstances:
A. XSBC only (no gzip) 1) On the SenderSimulation, select "File" 2) Unselect "GZip File" 3) Select "File" again, then "Load XML File", then "examples" (You should see a DOM tree representation of the XML file you select) 4) On the Receiver Simulation, select "Receive XSBC", then "examples" (Assign the corresponding schema for the XML file you selected in the SenderSimulation) 5) On SenderSimulation, select "Send" (You should see a DOM tree representation in the ReceiverSimulation) B. XSBC (w/ gzip) 1) On the SenderSimulation, select "File", then "Load XML File", then "examples" (You should see a DOM tree representation of the XML file you select) 2) On the Receiver Simulation, select "Receive XSBC", then "examples" (Assign the corresponding schema for the XML file you selected in the SenderSimulation) 3) On SenderSimulation, select "Send" (You should see a DOM tree representation in the ReceiverSimulation) C. XSBC (w/ gzip and FEC) 1) On the SenderSimulation, select "File" 2) Select "Encode with FEC" 3) Select "File" again, then "Load XML File", then "examples" (You should see a DOM tree representation of the XML file you select) 4) On the Receiver Simulation, select "Receive Encoded", then "examples" (Assign the corresponding schema for the XML file you selected in the SenderSimulation) 5) On SenderSimulation, select "Send" (You should see DOM tree representation in the ReceiverSimulation) D. XSBC (w/o gzip, but w/ FEC) 1) On the SenderSimulation, select "File" 2) Select "Encode with FEC" 3) Select "File" again, then unselect "GZip File" 4) Select "File", then "Load XML File", then "examples" (You should see a DOM tree representation of the XML file you select) 5) On the Receiver Simulation, select "Receive Encoded", then "examples" (Assign the corresponding schema for the XML file you selected in the SenderSimulation) 6) On SenderSimulation, select "Send" (You should see DOM tree representation in the ReceiverSimulation) E. In any of the above instances, selecting the "Send" button a second time will produce an xml file named "resultsXsbc0.xml" in the path /dataweb/results F. Save a file in .xsbc form and retrieve manually with ReceiverSimulation 1) On the SenderSimulation, select "File" 2) Unselect "GZip File" 3) Select "File" again, then "Load XML File", then "examples" (You should see a DOM tree representation of the XML file you select) 4) Select "Save" 5) On the Receiver Simulation, select "File", then "Load Binary File" then "examples" (Assign the corresponding schema for the XML file you selected in the SenderSimulation, then select the corresponding *.xsbc file. You should see a DOM tree representation in the ReceiverSimulation) G. Save a file in .xsbc.gz form and retrieve manually with ReceiverSimulation 1) On the SenderSimulation, select "File" 2) Select "File", then "Load XML File", then "examples" (You should see a DOM tree representation of the XML file you select) 3) Select "Save" 4) On the Receiver Simulation, select "File", then "Load Binary File", then "examples" (Assign the corresponding schema for the XML file you selected in the SenderSimulation, then select the corresponding *.xsbc.gz file. You should a see DOM tree representation in the ReceiverSimulation)
org.web3d.xmsf.xsbc.apps.SAXExample
type:
ant launcher*
from a console and then execute the runapps*.* file for your system.
We need to develop a simple example to show this usage. Currently the best example is the ComparisonTool done for X3D binary process. You can find this code in Xj3D codebase under the contribs/xsbc area. Specifically look at the X3DElementReader class in contribs/xsbc/src/org/web3d/xmsf/xsbc/x3d/X3DElementReader.java. It implements the ElementReader interface from XSBC. This interface is similar to the SAX ContentHandler interface except that it delivers binary data instead of just strings.
XSBC has been offered as an royalty-free exemplar algorithm for the following efforts:
Once XSBC reaches version 1.0 functionality and performance, we expect to add a variety of functional improvements, including the following:
Please note that XSBC used to be named XFSP and is named such in the XSBC paper.