Skip to content

Commit d81e7f0

Browse files
authored
Converted readme to MarkDown
1 parent 41c00d8 commit d81e7f0

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

DataCompressor/common/doc/overview.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Overview
2+
---
3+
4+
common is a collection of headers for other libraries
5+
6+
`log.h`: Provides a printf-style logging macro
7+
8+
`io.h`: Provides types for file I/O as well as ftell and fopen macros (for 64-bit file I/O on platform supports it)
9+
10+
`err_codes.h`: Provides constants for common errors
11+
12+
Notes on usage
13+
---
14+
15+
* `IO_SIZE_BITS` specifies the number of bits used for file-I/O-related operations. In particular, the size of return values for Read/Write functions in dependent libraries are based on it
16+
* If `IO_SIZE_BITS` is the same size as size_t, the Read/Write functions in dependent libraries do not work properly if the MSB of a size_t variable specifying the size to be read/written is used. For example, if `IO_SIZE_BITS` is 32 and `sizeof(size_t)` is 4, the maximum size (parameter value) that the Read/Write function can work with is `2^31 - 1`, i.e., the 32nd bit cannot be used. If it is used, the return value of the functions will be interpreted as an error (since it is interpreted as a negative number)
17+
* Error codes have to be negative in order to distinguish them from return values which signal the amount of bytes read/written (which is positive)

0 commit comments

Comments
 (0)