GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71942
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fpcompress.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include "raster3d_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 Rast3d_fpcompress_print_binary (char *c, int numBits)
 
void Rast3d_fpcompress_dissect_xdr_double (unsigned char *numPointer)
 
int Rast3d_fpcompress_write_xdr_nums (int fd, char *src, int nofNum, int precision, char *compressBuf, int isFloat)
 
int Rast3d_fpcompress_read_xdr_nums (int fd, char *dst, int nofNum, int fileBytes, int precision, char *compressBuf, int isFloat)
 

Macro Definition Documentation

#define ALL_NULL_CODE   2

Definition at line 56 of file fpcompress.c.

#define SOME_NULL_CODE   0

Definition at line 58 of file fpcompress.c.

#define XDR_DOUBLE_LENGTH   8

Definition at line 9 of file fpcompress.c.

Referenced by Rast3d_fpcompress_read_xdr_nums().

#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 57 of file fpcompress.c.

Function Documentation

void Rast3d_fpcompress_dissect_xdr_double ( unsigned char *  numPointer)

Definition at line 31 of file fpcompress.c.

References Rast3d_fpcompress_print_binary(), and sign().

void Rast3d_fpcompress_print_binary ( char *  c,
int  numBits 
)

Definition at line 16 of file fpcompress.c.

Referenced by Rast3d_fpcompress_dissect_xdr_double().

int Rast3d_fpcompress_read_xdr_nums ( int  fd,
char *  dst,
int  nofNum,
int  fileBytes,
int  precision,
char *  compressBuf,
int  isFloat 
)
int Rast3d_fpcompress_write_xdr_nums ( int  fd,
char *  src,
int  nofNum,
int  precision,
char *  compressBuf,
int  isFloat 
)

Definition at line 690 of file fpcompress.c.

References G_write_compressed(), and Rast3d_error().