3 stringidx is just an offset in 'string data'; all strings are 0-terminated;
4 before each string one can find it's length without trailing zero as dw.
7 #ifndef USE_DEVID_INODE
14 dd string_bytes ; # of bytes in 'string data'
15 dd ofs_bytes ; # of bytes in 'offsets'
16 dd o_tag_count ; # of 'original' tags
17 dd t_tag_count ; # of 'transliterated' tags
20 string data (see above):
24 tag lists (for 'original' and for 'transliterated'):
25 ; offsets in tag block
26 dd tagidx(o_tag_count)
27 dd tagidx(t_tag_count)
30 file info (for each file, names should be unique):
31 dd real_name_stringidx
32 dd short_name_stringidx ; this MUST be unique, it's used as 'file id' everywhere
33 ; file info (this fields are taken from stat() directly)
34 #ifdef USE_DEVID_INODE ; devid and inode are obsolete
35 dq devid ; can be 0, it means 'undefined/unknown'
36 dq inode ; can be 0, it means 'undefined/unknown'
38 dq size ; can be 0, it means 'undefined/unknown'
39 dq mtime ; can be 0, it means 'undefined/unknown'
40 db tracknum ; 0: unknown; this can be used to generate short file names
41 dw year ; 0: unknown; else: must be already normalized
42 dd year_tagid ; yes, years have their own textual tags, along with 'unknown year'
43 ; pair of tags; there can't be undefined tags, all undefined ones will be mapped to 'unknown_xxx'
49 dd yral_o, yeal_t ; 'year album' and 'year_album'
52 tag info (for each tag, names should be unique), repeats twice -- first for 'o', then for 't':
54 the following repeats 9 times, for year, artist_o, artist_t, album_o, album_t, title_o, title_t, genre_o, genre_t:
55 dd used_count ; # of files that used this tag at least once
56 dd ofsidx ; index in 'offsets'
60 dd fileidx(ofs_bytes/4)
63 this way we can simply mmap the whole tagdb if fusedrv.
65 note that badly crafted file will certainly crash the driver. i don't care. just don't trust other people
66 files (why you should use such files anyway? build your own database!)