#include <stdlib.h>
#include <stdio.h>
-#include <zlib.h>
+//#include <zlib.h>
+#include <unistd.h>
namespace BVMinisat {
class StreamBuffer {
- gzFile in;
+ int in;
unsigned char buf[buffer_size];
int pos;
int size;
void assureLookahead() {
if (pos >= size) {
pos = 0;
- size = gzread(in, buf, sizeof(buf)); } }
+ size = read(in, buf, sizeof(buf)); } }
public:
- explicit StreamBuffer(gzFile i) : in(i), pos(0), size(0) { assureLookahead(); }
+ explicit StreamBuffer(int i) : in(i), pos(0), size(0) { assureLookahead(); }
int operator * () const { return (pos >= size) ? EOF : buf[pos]; }
void operator ++ () { pos++; assureLookahead(); }
#include <stdlib.h>
#include <stdio.h>
-#include <zlib.h>
+//#include <zlib.h>
+#include <unistd.h>
namespace Minisat {
class StreamBuffer {
- gzFile in;
+ int in;
unsigned char buf[buffer_size];
int pos;
int size;
void assureLookahead() {
if (pos >= size) {
pos = 0;
- size = gzread(in, buf, sizeof(buf)); } }
+ size = read(in, buf, sizeof(buf)); } }
public:
- explicit StreamBuffer(gzFile i) : in(i), pos(0), size(0) { assureLookahead(); }
+ explicit StreamBuffer(int i) : in(i), pos(0), size(0) { assureLookahead(); }
int operator * () const { return (pos >= size) ? EOF : buf[pos]; }
void operator ++ () { pos++; assureLookahead(); }