]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/fastbuf.txt
hashtable: Updated docs.
[libucw.git] / ucw / doc / fastbuf.txt
1 Fastbufs
2 ========
3
4 A *fastbuf* is a stream (or file) abstraction optimized for both speed
5 and flexibility.
6
7 Fastbufs can represent many different kinds of objects: regular files, network
8 sockets, file descriptors in general, or various memory buffers. These objects
9 are handled by different fastbuf *back-ends.*
10
11 Once you have a fastbuf, you can access it by fuctions similar to those of
12 `stdio.h`, or you can use a variety of fastbuf *front-ends* providing various
13 formatted operations.
14
15 Please keep in mind that fastbufs do not allow arbitrary mixing of reads and
16 writes on the same stream. If you need to mix them, you have to call @bflush()
17 inbetween and remember that the file position reported by @btell() points after
18 the flushed buffer, which is not necessarily the same as after the data you've
19 really read.
20
21 .Back-ends:
22 - <<fbparam,Files (parametrized)>>
23 - <<fbfile,Regular files>>
24 - <<fbtemp,Temporary files>>
25 - <<fblim,File fragments>>
26 - <<fbmem,In-memory streams>>
27 - <<fbbuf,Buffers>>
28 - <<fbgrow,Growing buffers>>
29 - <<fbpool,Memory pools>>
30 - <<fbatomic,Atomic files>>
31
32 .Front-ends:
33 - <<ffbasic,Basic functions>>
34
35 .Other reading:
36 - <<internal,Internal structure>>
37 - <<bconfig,Configuring streams>>
38
39 ucw/fastbuf.h
40 -------------
41
42 !!ucw/fastbuf.h
43
44 ucw/fb-socket.h
45 ---------------
46
47 Fastbufs on network sockets with timeouts.
48
49 !!ucw/fb-socket.h
50
51 ucw/ff-unicode.h
52 ----------------
53
54 Reading and writing of unicode characters.
55
56 Invalid codes are replaced by `UNI_REPLACEMENT` when reading.
57
58 !!ucw/ff-unicode.h
59
60 ucw/ff-binary.h
61 ---------------
62
63 !!ucw/ff-binary.h