⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wpcuncompress.c

📁 su 的源代码库
💻 C
字号:
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       *//* WPCUNCOMPRESS: $Revision: 1.3 $ ; $Date: 1997/01/10 22:30:11 $	*/#include "par.h"#include "wpc.h"/*********************** self documentation ******************************/char *sdoc[] = {"                                                                       "," WPCUNCOMPRESS --- UNCOMPRESS a 2D section 				","                                                                       "," wpc1uncompress < stdin > stdout            				","                                                                       "," Required Parameters:                                                  ","                                                                       "," Optional Parameters:                                                  ","                                                                       "," Notes:                                                                ","  No parameter is required for this program. All the information for	","  uncompression has been encoded in the header of the compressed data.	","									"," Caveats:								","  For the current implementation, the compressed data themselves are	","  NOT portable, i.e., the data compressed on one platform might not be	","  recognizable on another.						","                                                                       ",NULL};/**************** end self doc *******************************************//* *       Credits: CWP: Tong Chen */intmain(int argc, char **argv){	float **f;	int n1, n2;	void *wpc;	float time_used=0.0;	initargs(argc, argv);	requestdoc(1);	wpc = wpcRead(stdin);	n1 = wpcN1(wpc);	n2 = wpcN2(wpc);	if(n1< 0 || n2 < 0) 	fprintf(stderr, "Inconsistent data\n");	f = alloc2float(n1, n2);	/*	time_used = wallsec();*/	if(!wpcUncompress(wpc, f[0])) 	fprintf(stderr, "Inconsistent data\n");/*	time_used = wallsec() - time_used;*/	fwrite(f[0], sizeof(float), n1*n2, stdout);	fprintf(stderr,"time used in uncompression is %f sec \n", time_used);	return EXIT_SUCCESS;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -