78 slen = (len) ? *len : strlen(ibuf);
79 buf = (
char *) calloc(
slen + 1, 1);
83 buf = (
char *)calloc(1,1);
92 buf = (
char *)calloc(1,1);
105 memcpy(
zbuf, ibuf, *len);
116 if (len) *len =
zlen;
133 memmove(ibuf, &
buf[
pos], len);
145 if ((
pos + len) > (
unsigned)
slen) {
147 memset(&
buf[
pos], 0, len + 1024);
150 else buf = (
char *)calloc(1, len + 1024);
151 memmove(&
buf[
pos], ibuf, len);
162 zbuf = (
char *)calloc(1, len + 1024);
200 unsigned long len, totlen = 0;
206 }
while (len == 1024);
#define SWORD_NAMESPACE_START
virtual void decode(void)
virtual void setCompressedBuf(unsigned long *len, char *buf=0)
virtual char * getCompressedBuf(unsigned long *len=0)
virtual char * getUncompressedBuf(unsigned long *len=0)
virtual void setUncompressedBuf(const char *buf=0, unsigned long *len=0)
virtual void encode(void)
virtual unsigned long getChars(char *buf, unsigned long len)
#define SWORD_NAMESPACE_END
virtual unsigned long sendChars(char *buf, unsigned long len)