Intelligente Dateisysteme Einführende Bemerkungen Manfred Thaller, Universität zu Köln Köln 17. Oktober 2013
I. Hardcore
Binäres Lesen (Qt flavour) 3 Annahme: Eine Datei ist eine lineare Sequenz von Bytes. Diese werden vom Beginn an mit einem Offset gezählt. Eine Datei kann also als Array auf der Festplatte verstanden werden.
Byte 0 Byte 1 Byte n -1 Byte n Inhalt
Binäres Lesen (Qt flavour) 5 Lesen imageFile.seek(ifd_addr); imageFile.read((char *)buffer,n); Schreiben imageFile.seek(ifd_addr); imageFile.write((char *)buffer,n); Position merken ifdstart = imageFile.pos();
Binäres Lesen (C - Directories) 6 struct dirent *dp; DIR *dir; if ( (dir=opendir(/x/y/z)! = NULL) { for (dp=readdir(dir); dp!=NULL; dp=readdir(dir)) { // Directory Entry bearbeiten … } closedir(dir); }
Binäres Lesen (C - Directories) 7 struct dirent { __ino_t d_ino; __off_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; };
II. Dateiformate
A deterministic specification how the properties of a digital object can reversibly be converted into a linear bytestream (bitstream). File format
File format: TIFF
Image width: 277 Image length: 339 Compression: uncompressed File format: TIFF
<svg:svg width="800" height="1000" xmlns:svg=" <svg:line x1="600" y1="20" x2="500" y2="20" stroke="black" … <svg:text x="600" y="28.8" font-size="6" fill="black" … Leiste File format: SVG
III. Dateien => Objekten
Byte 0 Byte 1 Byte n -1 Byte n Inhalt
Byte 0 Byte 1 Byte n - 1 Byte n == co Byte co + 0 Byte co + 1 Byte co + m - 1 Byte co + m Payload Context
IV. Ziele
Intelligent, wenn: eine Datei sich die richtige Software sucht … … über ein paar hundert Jahre hinweg. Intelligente Datei(systeme)...