Re: binary query results format, draft

On Thu, Oct 27, 2005 at 04:13:16PM +0200, Jeen Broekstra wrote:
> Results encoded in the binary query results format consist of a header
> followed by zero or more records. Values are stored in network order
> (Big-Endian).

Good idea. Useful for low powered devices where parsing XML is realtivly
>  - Bytes 0-3 contain the ASCII codes for the string "BRTR", which stands for
>    Binary RDF Table Result.
>  - Bytes 4-7 specify the format version (a 32-bit signed integer).
>  - Bytes 8-11 specify the number of columns of the query result that will
>    follow (a 32-bit signed integer).

How (are) the columns named, or are you expected to inspect the query?
FWIW, I'd prefer explicit column names in the results.

> UTF-8 String encoding
> =====================
> (Note: In the current Sesame implementation, a modified UTF-8 encoding
> scheme is used, which is the default UTF-8 encoding scheme in Java (see
> for details). Obviously this can be generalized/changed to be more
> standards-compliant. I am documenting the current Sesame/Java scheme here
> for now though).
> Each value encoded as an UTF-8 string is preceeded with a 2-byte prefix
> indicating the byte-length of the encoded string. The length is stored as
> a 16-bit unsigned short integer.

Why not NUL terminated? Does Sesame allow literals with NULs in? Doesnt
unmangling unalligned integers get expensive? If literals with NULs in are
important the length marker should be longer.

- Steve

Received on Thursday, 27 October 2005 14:29:29 UTC