summaryrefslogtreecommitdiff
path: root/doc/nerv_io.md
diff options
context:
space:
mode:
authorcloudygoose <[email protected]>2015-06-04 17:03:41 +0800
committercloudygoose <[email protected]>2015-06-04 17:03:41 +0800
commitf9e116ef514b27680434eb92d737135edd316875 (patch)
tree2f4765c43e761991f0dd86a4abb90ea1df4628c7 /doc/nerv_io.md
parentb53f40144715ef80d26e9a894ddc153e9ebfcc34 (diff)
doc change
Diffstat (limited to 'doc/nerv_io.md')
-rw-r--r--doc/nerv_io.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/nerv_io.md b/doc/nerv_io.md
new file mode 100644
index 0000000..7066939
--- /dev/null
+++ b/doc/nerv_io.md
@@ -0,0 +1,23 @@
+#The Nerv IO Package#
+Part of the [Nerv](../README.md) toolkit.
+
+##Description##
+There are four classes in to deal with chunk data, which are __nerv.ChunkFile__, __nerv.ChunkFileHandle__, __nerv.ChunkInfo__, __nerv.ChunkData__. Below is the underlying C structs.
+```
+typedef struct ChunkFileHandle {
+ FILE *fp;
+} ChunkFileHandle;
+
+typedef struct ChunkInfo {
+ off_t offset, length;
+} ChunkInfo;
+
+typedef struct ChunkData {
+ FILE *fp;
+ char *data;
+} ChunkData;
+```
+
+##Methods##
+* __ChunkFileHandle ChunkFile.\_\_init(string mode, string fn)__
+`mode` can be `r` or `w`, for reading or writing a file.