GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
fpcompress.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include "G3d_intern.h"
Include dependency graph for fpcompress.c:

Go to the source code of this file.

Macros

#define XDR_DOUBLE_LENGTH   8
 
#define XDR_DOUBLE_NOF_EXP_BYTES   2
 
#define XDR_FLOAT_LENGTH   4
 
#define XDR_FLOAT_NOF_EXP_BYTES   1
 
#define ALL_NULL_CODE   2
 
#define ZERO_NULL_CODE   1
 
#define SOME_NULL_CODE   0
 

Functions

void G_fpcompress_printBinary (char *c, int numBits)
 
void G_fpcompress_dissectXdrDouble (unsigned char *numPointer)
 
int G_fpcompress_writeXdrNums (int fd, char *src, int nofNum, int precision, char *compressBuf, int isFloat, int useRle, int useLzw)
 
int G_fpcompress_writeXdrFloats (int fd, char *src, int nofNum, int precision, char *compressBuf, int useRle, int useLzw)
 
int G_fpcompress_writeXdrDouble (int fd, char *src, int nofNum, int precision, char *compressBuf, int useRle, int useLzw)
 
int G_fpcompress_readXdrNums (int fd, char *dst, int nofNum, int fileBytes, int precision, char *compressBuf, int isFloat)
 
int G_fpcompress_readXdrFloats (int fd, char *dst, int nofNum, int fileBytes, int precision, char *compressBuf)
 
int G_fpcompress_readXdrDoubles (int fd, char *dst, int nofNum, int fileBytes, int precision, char *compressBuf)
 

Macro Definition Documentation

#define ALL_NULL_CODE   2

Definition at line 62 of file fpcompress.c.

#define SOME_NULL_CODE   0

Definition at line 64 of file fpcompress.c.

#define XDR_DOUBLE_LENGTH   8

Definition at line 9 of file fpcompress.c.

Referenced by G_fpcompress_readXdrNums().

#define XDR_DOUBLE_NOF_EXP_BYTES   2

Definition at line 10 of file fpcompress.c.

#define XDR_FLOAT_LENGTH   4

Definition at line 11 of file fpcompress.c.

#define XDR_FLOAT_NOF_EXP_BYTES   1

Definition at line 12 of file fpcompress.c.

#define ZERO_NULL_CODE   1

Definition at line 63 of file fpcompress.c.

Function Documentation

void G_fpcompress_dissectXdrDouble ( unsigned char *  numPointer)

Definition at line 37 of file fpcompress.c.

References G_fpcompress_printBinary(), and sign().

void G_fpcompress_printBinary ( char *  c,
int  numBits 
)

Definition at line 22 of file fpcompress.c.

Referenced by G_fpcompress_dissectXdrDouble().

int G_fpcompress_readXdrDoubles ( int  fd,
char *  dst,
int  nofNum,
int  fileBytes,
int  precision,
char *  compressBuf 
)

Definition at line 899 of file fpcompress.c.

References G3d_error(), and G_fpcompress_readXdrNums().

int G_fpcompress_readXdrFloats ( int  fd,
char *  dst,
int  nofNum,
int  fileBytes,
int  precision,
char *  compressBuf 
)

Definition at line 883 of file fpcompress.c.

References G3d_error(), and G_fpcompress_readXdrNums().

int G_fpcompress_readXdrNums ( int  fd,
char *  dst,
int  nofNum,
int  fileBytes,
int  precision,
char *  compressBuf,
int  isFloat 
)
int G_fpcompress_writeXdrDouble ( int  fd,
char *  src,
int  nofNum,
int  precision,
char *  compressBuf,
int  useRle,
int  useLzw 
)

Definition at line 811 of file fpcompress.c.

References G3d_error(), and G_fpcompress_writeXdrNums().

int G_fpcompress_writeXdrFloats ( int  fd,
char *  src,
int  nofNum,
int  precision,
char *  compressBuf,
int  useRle,
int  useLzw 
)

Definition at line 795 of file fpcompress.c.

References G3d_error(), and G_fpcompress_writeXdrNums().

int G_fpcompress_writeXdrNums ( int  fd,
char *  src,
int  nofNum,
int  precision,
char *  compressBuf,
int  isFloat,
int  useRle,
int  useLzw 
)