The invention relates to any conversions in which data of a certain source
format are converted into data of a certain target format. The
conversions may also be bi-directional. The invention includes a method
for performing data structure conversions, wherein a data structure
comprises at least two elements located in a predetermined order in the
data structure. The data structure is defined by using a definition
language, and it is represented as a source bit string. During the
conversion the source bit string is converted into a target bit string.
The method for performing the data structure conversion handles the data
structure elements in the same order as they are located in the data
structure without parsing the source bit string. The avoidance of the
parsing makes the method more efficient than the prior art methods. In
addition, the method decodes each data structure element and encodes it
directly into the target bit string. Also the avoidance of unnecessary
copying of data makes the method efficient.