Ruby: ext/zlib/zlib-1.2.13/contrib/testzlib/testzlib.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Functions
testzlib.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <windows.h>`
`#include "zlib.h"`

Go to the source code of this file.

## Functions
void | MyDoMinus64 (LARGE_INTEGER *R, LARGE_INTEGER A, LARGE_INTEGER B)
void | myGetRDTSC32 (LARGE_INTEGER *pbeginTime64)
void | BeginCountRdtsc (LARGE_INTEGER *pbeginTime64)
LARGE_INTEGER | GetResRdtsc (LARGE_INTEGER beginTime64, BOOL fComputeTimeQueryPerf)
void | BeginCountPerfCounter (LARGE_INTEGER *pbeginTime64, BOOL fComputeTimeQueryPerf)
DWORD | GetMsecSincePerfCounter (LARGE_INTEGER beginTime64, BOOL fComputeTimeQueryPerf)
int | ReadFileMemory (const char *filename, long *plFileSize, unsigned char **pFilePtr)
int | main (int argc, char *argv[])

## Function Documentation

## ◆ BeginCountPerfCounter()

void BeginCountPerfCounter | ( | LARGE_INTEGER * | pbeginTime64,
|  | BOOL | fComputeTimeQueryPerf
| ) |  |

Definition at line 84 of file testzlib.c.

Referenced by main().

## ◆ BeginCountRdtsc()

void BeginCountRdtsc | ( | LARGE_INTEGER * | pbeginTime64 | ) |

Definition at line 71 of file testzlib.c.

Referenced by main().

## ◆ GetMsecSincePerfCounter()

DWORD GetMsecSincePerfCounter | ( | LARGE_INTEGER | beginTime64,
|  | BOOL | fComputeTimeQueryPerf
| ) |  |

Definition at line 93 of file testzlib.c.

References MyDoMinus64().

Referenced by main().

## ◆ GetResRdtsc()

LARGE_INTEGER GetResRdtsc | ( | LARGE_INTEGER | beginTime64,
|  | BOOL | fComputeTimeQueryPerf
| ) |  |

Definition at line 75 of file testzlib.c.

Referenced by main().

## ◆ main()

int main | ( | int argc | ,
|  | char * | argv[]
| ) |  |

Definition at line 145 of file testzlib.c.

References argc, argv, z_stream_s::avail_in, z_stream_s::avail_out, BeginCountPerfCounter(), BeginCountRdtsc(), deflate(), deflateEnd(), deflateInit, GetMsecSincePerfCounter(), GetResRdtsc(), inflate(), inflateEnd(), inflateInit, int(), malloc, memcmp(), z_stream_s::next_in, z_stream_s::next_out, ReadFileMemory(), realloc, z_stream_s::total_in, z_stream_s::total_out, TRUE, Z_DEFAULT_COMPRESSION, Z_FINISH, Z_OK, and Z_SYNC_FLUSH.

## ◆ MyDoMinus64()

void MyDoMinus64 | ( | LARGE_INTEGER * | R,
|  | LARGE_INTEGER | A,
|  | LARGE_INTEGER | B
| ) |  |

Definition at line 8 of file testzlib.c.

References R.

Referenced by GetMsecSincePerfCounter().

## ◆ myGetRDTSC32()

void myGetRDTSC32 | ( | LARGE_INTEGER * | pbeginTime64 | ) |

Definition at line 67 of file testzlib.c.

## ◆ ReadFileMemory()

int ReadFileMemory | ( | const char * | filename,
|  | long * | plFileSize,
|  | unsigned char ** | pFilePtr
| ) |  |

Definition at line 119 of file testzlib.c.

References malloc, NULL, ptr, SEEK_END, and SEEK_SET.

Referenced by main().