GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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

◆ ALL_NULL_CODE

#define ALL_NULL_CODE   2

Definition at line 56 of file fpcompress.c.

◆ SOME_NULL_CODE

#define SOME_NULL_CODE   0

Definition at line 58 of file fpcompress.c.

◆ XDR_DOUBLE_LENGTH

#define XDR_DOUBLE_LENGTH   8

Definition at line 9 of file fpcompress.c.

◆ XDR_DOUBLE_NOF_EXP_BYTES

#define XDR_DOUBLE_NOF_EXP_BYTES   2

Definition at line 10 of file fpcompress.c.

◆ XDR_FLOAT_LENGTH

#define XDR_FLOAT_LENGTH   4

Definition at line 11 of file fpcompress.c.

◆ XDR_FLOAT_NOF_EXP_BYTES

#define XDR_FLOAT_NOF_EXP_BYTES   1

Definition at line 12 of file fpcompress.c.

◆ ZERO_NULL_CODE

#define ZERO_NULL_CODE   1

Definition at line 57 of file fpcompress.c.

Function Documentation

◆ Rast3d_fpcompress_dissect_xdr_double()

void Rast3d_fpcompress_dissect_xdr_double ( unsigned char *  numPointer)

Definition at line 31 of file fpcompress.c.

References Rast3d_fpcompress_print_binary(), and sign().

◆ Rast3d_fpcompress_print_binary()

void Rast3d_fpcompress_print_binary ( char *  c,
int  numBits 
)

Definition at line 16 of file fpcompress.c.

Referenced by Rast3d_fpcompress_dissect_xdr_double().

◆ Rast3d_fpcompress_read_xdr_nums()

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

Definition at line 720 of file fpcompress.c.

◆ Rast3d_fpcompress_write_xdr_nums()

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.