NCBI C++ ToolKit
Enumerations | Functions | Variables
bgzf.cpp File Reference
#include <ncbi_pch.hpp>
#include <sra/readers/bam/bgzf.hpp>
#include <util/util_exception.hpp>
#include <util/checksum.hpp>
#include <util/compress/zlib/zlib.h>
+ Include dependency graph for bgzf.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Enumerations

enum  EFileMode { eUseFileIO , eUseMemFile , eUseVDBFile }
 

Functions

 NCBI_PARAM_DECL (int, BGZF, DEBUG)
 
 NCBI_PARAM_DEF_EX (int, BGZF, DEBUG, 0, eParam_NoThread, BGZF_DEBUG)
 
static int s_GetDebug (void)
 
static CPagedFile::TFilePos s_GetPagePos (CPagedFile::TFilePos file_pos)
 
static char * s_Reserve (size_t size, CSimpleBufferT< char > &buffer)
 
static const char * s_Read (char *buffer, size_t len, CPagedFile &file, CPagedFile::TPage &page, Uint8 file_pos)
 
ostream & operator<< (ostream &out, const CBGZFPos &p)
 
ostream & operator<< (ostream &out, const CBGZFRange &r)
 

Variables

static const EFileMode kFileMode = eUseVDBFile
 
static const bool kCheckBlockCRC32 = true
 
static const size_t kSegmentSizePow2 = 22
 
static const size_t kSegmentSize = 1 << kSegmentSizePow2
 
static const size_t kFixedHeaderSize = 12
 
static const size_t kExtraHeaderSize = 4
 
static const size_t kRequiredExtraSize = kExtraHeaderSize + 2
 
static const size_t kInitialExtraSize = kRequiredExtraSize
 
static const size_t kFooterSize = 8
 

Enumeration Type Documentation

◆ EFileMode

enum EFileMode
Enumerator
eUseFileIO 
eUseMemFile 
eUseVDBFile 

Definition at line 59 of file bgzf.cpp.

Function Documentation

◆ NCBI_PARAM_DECL()

NCBI_PARAM_DECL ( int  ,
BGZF  ,
DEBUG   
)

◆ NCBI_PARAM_DEF_EX()

NCBI_PARAM_DEF_EX ( int  ,
BGZF  ,
DEBUG  ,
,
eParam_NoThread  ,
BGZF_DEBUG   
)

◆ operator<<() [1/2]

ostream& operator<< ( ostream &  out,
const CBGZFPos p 
)

Definition at line 337 of file bgzf.cpp.

References CBGZFPos::GetByteOffset(), CBGZFPos::GetFileBlockPos(), and out().

◆ operator<<() [2/2]

ostream& operator<< ( ostream &  out,
const CBGZFRange r 
)

Definition at line 343 of file bgzf.cpp.

References out(), and r().

◆ s_GetDebug()

static int s_GetDebug ( void  )
static

◆ s_GetPagePos()

static CPagedFile::TFilePos s_GetPagePos ( CPagedFile::TFilePos  file_pos)
inlinestatic

Definition at line 77 of file bgzf.cpp.

References kSegmentSize.

Referenced by CPagedFile::GetPage().

◆ s_Read()

static const char* s_Read ( char *  buffer,
size_t  len,
CPagedFile file,
CPagedFile::TPage page,
Uint8  file_pos 
)
static

Definition at line 298 of file bgzf.cpp.

References _ASSERT, buffer, cnt, file, CBGZFBlock::kMaxFileBlockSize, len, and min().

Referenced by CBGZFFile::x_ReadBlock().

◆ s_Reserve()

static char* s_Reserve ( size_t  size,
CSimpleBufferT< char > &  buffer 
)
inlinestatic

Variable Documentation

◆ kCheckBlockCRC32

const bool kCheckBlockCRC32 = true
static

Definition at line 65 of file bgzf.cpp.

Referenced by CBGZFFile::x_ReadBlock().

◆ kExtraHeaderSize

const size_t kExtraHeaderSize = 4
static

Definition at line 479 of file bgzf.cpp.

Referenced by CBGZFFile::x_ReadBlock().

◆ kFileMode

const EFileMode kFileMode = eUseVDBFile
static

Definition at line 64 of file bgzf.cpp.

Referenced by CPagedFile::CPagedFile().

◆ kFixedHeaderSize

const size_t kFixedHeaderSize = 12
static

Definition at line 478 of file bgzf.cpp.

Referenced by CBGZFFile::x_ReadBlock().

◆ kFooterSize

const size_t kFooterSize = 8
static

Definition at line 482 of file bgzf.cpp.

Referenced by CBGZFFile::x_ReadBlock().

◆ kInitialExtraSize

const size_t kInitialExtraSize = kRequiredExtraSize
static

Definition at line 481 of file bgzf.cpp.

Referenced by CBGZFFile::x_ReadBlock().

◆ kRequiredExtraSize

const size_t kRequiredExtraSize = kExtraHeaderSize + 2
static

Definition at line 480 of file bgzf.cpp.

Referenced by CBGZFFile::x_ReadBlock().

◆ kSegmentSize

const size_t kSegmentSize = 1 << kSegmentSizePow2
static

Definition at line 74 of file bgzf.cpp.

Referenced by CPagedFile::GetPage(), and s_GetPagePos().

◆ kSegmentSizePow2

const size_t kSegmentSizePow2 = 22
static

Definition at line 73 of file bgzf.cpp.

Modified on Sat Jun 15 11:50:42 2024 by modify_doxy.py rev. 669887