summaryrefslogtreecommitdiffstats
path: root/LzmaDec.c
diff options
context:
space:
mode:
Diffstat (limited to 'LzmaDec.c')
-rw-r--r--LzmaDec.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/LzmaDec.c b/LzmaDec.c
index 36ecb32..cc4279d 100644
--- a/LzmaDec.c
+++ b/LzmaDec.c
@@ -14,47 +14,6 @@
#include "lzip.h"
#include "LzmaDec.h"
-
-CRC32 crc32;
-
-
-/* Returns the number of bytes really read.
- If (returned value < size) and (errno == 0), means EOF was reached.
-*/
-int readblock( const int fd, uint8_t * const buf, const int size )
- {
- int rest = size;
- errno = 0;
- while( rest > 0 )
- {
- const int n = read( fd, buf + size - rest, rest );
- if( n > 0 ) rest -= n;
- else if( n == 0 ) break; /* EOF */
- else if( errno != EINTR && errno != EAGAIN ) break;
- errno = 0;
- }
- return size - rest;
- }
-
-
-/* Returns the number of bytes really written.
- If (returned value < size), it is always an error.
-*/
-int writeblock( const int fd, const uint8_t * const buf, const int size )
- {
- int rest = size;
- errno = 0;
- while( rest > 0 )
- {
- const int n = write( fd, buf + size - rest, rest );
- if( n > 0 ) rest -= n;
- else if( n < 0 && errno != EINTR && errno != EAGAIN ) break;
- errno = 0;
- }
- return size - rest;
- }
-
-
#define kNumTopBits 24
#define kTopValue ((uint32_t)1 << kNumTopBits)