Discussion List Archives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ddlm-group] Add 'Encoded' data type to DDLm

Hello again,

Following on from the regular expression discussion I have been thinking about how to incorporate images into DDLm in a way that follows img_CIF tradition.  I have therefore raised an issue at https://github.com/COMCIFS/cif_core/issues/174 , the text of which is reproduced here:


The img_CIF dictionary contains dataname _array_data.data which is defined to be of binary type in DDL2. binary type has an associated regular expression which defines a special header for embedding binary into a CIF/CBF file. Non-machine-readable instructions are provided in the imgCIF dictionary on how to convert the contents to an array of integers.

imgCBF files are identical to CIF files except that they can include arbitrary non-ASCII bytes after the same header.

The processing of the compressed encoded data found within an _array_data.data value is often quite intricate and not particularly enlightening from a scientific point of view (e.g. irrelevant to any other storage format), so I think is best left to libraries specialised for this work rather than rewritten in dREL. One way in which we can avoid writing decompression dREL is to create an 'Encoded' DDLm type which corresponds exactly to the 'binary' type in DDL2. Crucially, we also define a new built-in dREL function 'Decode', which turns a supplied binary or text stream into an array of integers. A small dREL fragment for new data name '_array_data.as_integers' would strip off the headers and provide the parameters for decoding based on the other img_CIF data names.


Does anybody have any comments on these suggestions?  

I know you may have been snowed under with discussion this week so I think we can wait a week or so for considered comments.

T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148
ddlm-group mailing list

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Science Council (admitted 1947). Member of CODATA, the ISC Committee on Data. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

International Science Council Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.