Liquid Fast Infoset - XML Compression Library
Liquid Fast Infoset .Net is a 100% .Net class library, provided in a single DLL, that allows you to quickly add Fast Infoset, ITU-T (X.891) and ISO (IEC 24824-1), support to your .Net project and is available free for use in Open Source projects.
Open Source Development
Liquid Fast Infoset .Net is a 100% .Net class library, provided in a single DLL, and is available as a Nuget so you can quickly add Fast Infoset support to your .Net project (Liquid Fast Infoset Nuget).
XML is now the standard method for exchanging data, it has many advantages, but it is not perfect. The documents produced are verbose, taking up much more space on the wire than they need to and parsing an XML document into something a program can read is very processor intensive.
Liquid's XML Compression library solves these problems using the industry standard "Fast InfoSet". Fast InfoSet (FI) provides a way of storing XML data in a more efficient format. FI documents have two distinct advantages, they are small giving about an 90% reduction in the size of the original XML document (so 100KB becomes 10KB), they are faster to parse taking approximately 60% of the CPU time to parse them, see our performance statistics.
Liquid Fast Infoset for .Net provides an intuitive API that integrates with the .Net framework XML classes. The FIReader and FIWriter classes derive from XmlReader and XmlWriter respectively and so can be seamlessly integrated within your application in place of existing .Net classes such as XmlTextReader XmlTextWriter. Integration into an existing code base can be just a matter of changing a couple of lines of code, see our sample code
Fast Infoset ITU-T and ISO Standard
Fast Infoset is an ITU-T (X.891) and ISO (IEC 24824-1) defined standard that specifies a binary encoding for W3C XML Information Set. Unlike other XML representations, the Fast Infoset standard has the dual benefits of both compression and performance, making it the ideal choice for moving large XML data between disparate low bandwidth systems or for high performance systems such as those utilizing Web services.
Liquid Technologies was a primary vendor in an interoperability testing effort showing Fast Infoset to be a mature, reliable technology. Software developers can now invest in Fast Infoset technology with the confidence that third parties will be able to interact with the XML data produced using a variety of vendors' products across many platforms such as Microsoft Windows, Linux and Sun Microsystems Solaris, using C++, Java or Microsoft .Net.
Along with this stand alone implementation, we also provide a cross platform C++ implementation and Microsoft .Net (C# and VB .Net) implementations of the Fast Infoset standard as part of the Liquid XML Data Binding toolset.
With mobile devices typically having access to low bandwidth data connections, and have slower CPU's. This makes Fast Infoset an obvious choice, lowing both data transmission and data processing times. The Liquid XML Compression LIbrary runs on the compact framework, so can be used on Win CE, and Pocket PC devices. The dll is approximately 60KB, and is very memory efficient when running, making it ideal for use on mobile devices.
Persisting Large Volumes of Data
When persisting XML either to file or a database, the volume of data your system produces can often get out of hand. This has a number of detrimental effects, the access times go up as your reading more data, CPU load goes up as XML data takes more effort to process, and your storage costs go up. By persisting your XML data as Fast Infoset's you can reduce your data volumes by up to 5 times.
Passing XML via the internet
As soon as an application starts passing information over the internet, one of the main bottle necks is bandwidth. If you sending reasonable chunks of data, this bottle neck can seriously degrade the performance of your client applications and limit your servers ability to process requests. By reducing the amount of data moving across internet you can reduce the time it takes a message to be sent or received. While increasing the number of transactions your server can process per hour.
Liquid Fast Infoset for .Net supports the following platforms:
- .Net Framework 2.0+
- .Net Standard 2.0+
Ease of Use
Often there is a steep learning curve involved in utilizing new technologies. Liquid Fast Infoset for .Net has a flat curve for anyone who already uses the standard .Net XML classes.
The LiquidTechnologies.FIReader and LiquidTechnologies.FIWriter classes can be directly used in place of System.Xml.XmlTextReader and System.Xml.XmlTextWriter classes with no alterations to the surrounding code, see our sample code.
This means you can have your application up and running with the benefits of Fast Infoset support very quickly and with very little effort and risk.
If your .Net application needs to move XML data over a low bandwidth system or needs to store large amounts of XML data in a compressed format then Liquid Fast Infoset for .Net can provide the solution.
The following graph shows a typical compression ratio achievable for Fast infoset encoded XML documents over standard XML documents*:
As you can see from the graph, the Fast Infoset encoded data is compressed to around 12% of the original XML document size. Better still, reading and writing the compressed data is faster than reading and writing non-compressed XML data.
*Data compression shown is an average for the Microsoft XML Mark 1.1 test documents.
If your .Net application is failing to perform XML transactions to its required service level, then Liquid Fast Infoset for .Net can provide the solution.
The following graph shows a the data manipulation ration achievable for Fast Infoset encoded XML documents and standard XML documents (see detailed results for individual test results)**:
As you can see from the graph, the Fast Infoset encoded data is manipulated on average 67% faster than that of standard XML data.
The following graph and table show the detailed results for each of the XML Mark 1.1 test performed.
** This gives a direct comparison of performance between FIReader and FIWriter and XmlTextReader and XmlTextWriter.
In every case, the Liquid Fast Infoset for .Net v1.0.2 classes outperform the Microsoft .Net Framework 2.0 classes.
|XML Mark 1.1 Test||Liquid Fast Infoset for .Net v1.0.2 (TPS)||Microsoft .Net Framework 2.0 (TPS)||Percentage Ratio Performance Gain|
*Microsoft XML Mark 1.1 test were performed on a Sun Ultra 20 Workstation (1 x 2.2GHz AMD Opteron 148 Processor, 1GB RAM, NVIDIA nForce4 Serial ATA Controller, Seagate 80GB SATA 7200RPM HDD formatted as NTFS, Windows XP SP2).
Liquid Fast Infoset for .Net provides an intuitive API that integrates with the .Net framework XML classes. The FIReader and FIWriter classes derive from XmlReader and XmlWriter respectively and so can be seamlessly integrated within your application in place of existing .Net classes such as XmlTextReader and XmlTextWriter.
Simply add the LiquidTechnologies.FastInfoset Nuget to your .Net project (Liquid Fast Infoset Nuget).
The XmlDocument class within the .Net Framework represents an XML document implemented as a DOM tree.
These examples show how Liquid Fast Infoset for .Net easily integrates with the XmlDocument class in the same way as the .Net classes XmlTextReader and XmlTextWriter, allowing us to convert between the Xml document and Fast Infoset document formats with just a few lines of code.
Example: Convert an XML document to a Fast Infoset document in C#
using System.Xml; using LiquidTechnologies.FastInfoset; string xmlFilename = @"c:\MyFile.xml"; string finfFilename = @"c:\MyFile.finf"; XmlDocument doc = new XmlDocument(); // Read a standard XML document file into an XmlDocument using XmlTextReader XmlReader reader = XmlReader.Create(new XmlTextReader(xmlFilename), null); doc.Load(reader); reader.Close(); // Write the XML document to a file encoded as Fast Infoset using FIWriter XmlWriter fiWriter = XmlWriter.Create(new FIWriter(finfFilename)); doc.WriteTo(fiWriter); fiWriter.Close();
Example: Convert a Fast Infoset document to an XML document in C#
using System.Xml; using LiquidTechnologies.FastInfoset; string xmlFilename = @"c:\MyFile.xml"; string finfFilename = @"c:\MyFile.finf"; XmlDocument doc = new XmlDocument(); // Read a Fast Infoset encoded file into an XmlDocument using FIReader XmlReader fiReader = XmlReader.Create(new FIReader(finfFilename), null); doc.Load(fiReader); fiReader.Close(); // Write a standard XML document to file using XmlTextWriter XmlWriter writer = XmlWriter.Create(new XmlTextWriter(xmlFilename, Encoding.Default)); doc.WriteTo(writer); writer.Close();
XmlSerializer is used in the .Net Framework to serialize and deserialize objects into and from XML documents. The XmlSerializer enables you to control how objects are encoded into XML. Using the Liquid Fast Infoset for .Net classes FIReader and FIWriter with XmlSerializer allows you to serialize and deserialize your objects directly to and from FastInfoset encoded documents.