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

📄 bitstrm.h

📁 一OCR的相关资料。.希望对研究OCR的朋友有所帮助.
💻 H
字号:
/********************************************************************** * File:        bitstrm.h  (Formerly bits.h) * Description: R_BITSTREAM and W_BITSTREAM class definitions. * Author:					Ray Smith * Created:					Tue Feb 19 10:44:22 GMT 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/#ifndef           BITSTRM_H#define           BITSTRM_H#include          "host.h"#define BITBUFSIZE      8192     //bitstream bufferclass DLLSYM R_BITSTREAM{  private:    int bitfd;                   //file descriptor    INT32 bitindex;              //current byte    UINT32 bitword;              //current word    INT32 bitbit;                //current bit    INT32 bufsize;               //size of buffer    UINT8 bitbuf[BITBUFSIZE];    //bitstream buffer                                 //for reading codes    static const UINT16 bitmasks[17];  public:    R_BITSTREAM() {     };                           //Null constructor    UINT16 open(          //open to read                int fd);  //file to read    UINT16 read_code(                //read a code                     UINT8 length);  //bits to lose    UINT16 masks(               //read a code                 INT32 index);  //bits to lose};class DLLSYM W_BITSTREAM{  private:    int bitfd;                   //file descriptor    INT32 bitindex;              //current byte    UINT32 bitword;              //current word    INT32 bitbit;                //current bit    UINT8 bitbuf[BITBUFSIZE];    //bitstream buffer  public:    W_BITSTREAM() {     };                           //Null constructor    void open(          //open to write              int fd);  //file to write    INT8 write_code(                //write a code                    UINT16 code,    //code to write                    UINT8 length);  //bits to lose};#endif

⌨️ 快捷键说明

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