File formats
Assyst reads the legacy text and binary formats of the Windows program Assist and writes its own lossless .qsze format.
QST / TXT
Plain text. A line starting with ? begins a question, + marks a correct answer, - an incorrect one. Multi-line text is allowed. One + makes a single-choice question, several make a multiple-choice question. UTF-8 (with or without BOM), UTF-16 and Windows-1251 are detected on import.
Gap questions keep the missing words inside the question text as ***[answer]***, so even the plain .qst export stays readable.
?Question text (may span several lines) +Correct answer -Incorrect answer -Incorrect answer +Another correct answer ?Capital of Kazakhstan is ***[Astana]*** +Astana
QSZ
The legacy binary format: a zlib stream in which each question is stored as an int32 length and text, an answer count, and per-answer text with a flag (−1 correct, 0 incorrect). Only choice questions can be represented.
zlib stream, repeated per question:
int32 question length L
bytes question text (L)
int32 answers count N
× N:
int32 answer length
bytes answer text
int32 flag (-1 correct, 0 incorrect)QSZE
The native format: zlib, little-endian int32 numbers, UTF-8 strings. It stores the test name, author, version, dates, question groups, all six question types, help texts and embedded images for both questions and answers. This is the format to use when you want nothing lost.
zlib stream, int32 little-endian, str = int32 len + UTF-8
Header
int32 format_version (= 1)
str test_name
str author
int32 test_version
int32 created_at (unix seconds)
int32 updated_at (unix seconds, 0 if never)
Groups
int32 groups_count
str[] group_name
Questions
int32 questions_count
× questions_count:
int32 group_id (0 = no group, else 1-based)
int32 type (0 test, 1 order, 2 fill_text,
3 fill_number, 4 misses_type, 5 misses_select)
str text
str prompt
int32 images_count, blob[] image
int32 answers_count
× answers_count:
int32 is_correct (only when type == 0)
str text
int32 images_count, blob[] image