Archiving Format for Packed Resources
If you pack resource into an XML CAS collection a new physical file is created from the existing physical file. This occurs in the same WebDAV collection or in the same file system directory. This file has the .axml (for Archive XML). SAP purposely reveals the format of the .axml files to guarantee that the contents of a collection are stored in a secure and compact manner and to ensure future access to the files.. The following description makes it possible to read or to reconstruct the packed resources, even if you use other tools.
The archiving format defined by SAP is based on the following principles:
-
Standards (implementation of widely used compression standards; use of XML)
-
Simplicity (use of meta data, which is important for long-term archiving of data; the use of a sequential block structure and length information facilitates the easy implementation of interpreters for .axml files)
-
Tolerance in case of errors (easy to find the restart point in case of corrupt blocks; platform-independent specification)
-
Efficiency (compressed resources are addressed using byte offsets)
An .axml file is comprised of a header and a sequence of blocks. Each block starts with a prefix and contains a compress resource. This structure is illustrated in the following figure:
The structure of a header is represented in the following figure. All metadata texts are coded in UTF-8. This also includes the fixed beginning ID AXML and the release description 01.0. As is common usage in the GZIP format (RFC 1952) and the ZLIB format (RFC 1950) currently we only support the deflate compression algorithm from RFC 1951 and therefore use the 5th byte as X’08’. The XML DAS does not encrypt the .axml files in format release 1.0. Thus, the 6th byte here is X’00’. The length of the URI for AXML files is written in front of the URI. The most significant byte values of the length coding come before the least significant byte values.
The following figure shows that each prefix begins with an MIB number for the Unicode Transformation UTF-8, according to IANA standards for character sets (Internet Assigned Numbers Authority). This is followed by the XML DAS resource type in UTF-8, for example X’58 4D 4C’ for ‘XML’. You need one byte to specify the length of the resource name. 4 bytes are reserved for the length of the compressed resource. The more significant bytes are saved first, independent of the platform in that same was as with the header.