48 const char* iter = src + pos;
49 const char* end = src + pos + length;
51 for ( ; iter != end; ++iter, ++dst ) {
68 const char* iter = src + (pos / 2);
72 *dst =
table[
static_cast<unsigned char>(*iter) * 2 + 1];
82 for(
size_t i =
size / 2;
i; --
i, ++out_i, ++iter ) {
83 *out_i = table2[
static_cast<Uint1>(*iter)];
90 char*
last =
reinterpret_cast<char*
>(out_i);
105 size_t size = length;
107 const char* iter = src + (pos / 4);
110 if ( pos % 4 != 0 ) {
111 size_t to =
min(
static_cast<unsigned int>(4), (pos % 4) + length);
112 for (
size_t i = pos % 4;
i < to; ++
i, ++dst ) {
116 size -= to - (pos % 4);
123 for(
size_t i =
size / 4;
i; --
i, ++out_i, ++iter ) {
124 *out_i = table4[
static_cast<Uint1>(*iter)];
130 char*
last =
reinterpret_cast<char*
>(out_i);
148 const char* begin = src + pos;
149 const char* iter = src + pos + length;
151 for ( ; iter != begin; ++dst ) {
201 default:
return length;
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
unsigned int TSeqPos
Type for sequence locations and lengths.
uint8_t Uint1
1-byte (8-bit) unsigned integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const struct ncbi::grid::netcache::search::fields::SIZE size
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
SIZE_TYPE convert_1_to_4(const char *src, TSeqPos pos, TSeqPos length, char *dst, const Uint1 *table)
SIZE_TYPE copy_1_to_1_reverse(const char *src, TSeqPos pos, TSeqPos length, char *dst, const Uint1 *table)
SIZE_TYPE convert_1_to_2(const char *src, TSeqPos pos, TSeqPos length, char *dst, const Uint1 *table)
size_t GetBasesPerByte(CSeqUtil::TCoding coding)
SIZE_TYPE GetBytesNeeded(CSeqUtil::TCoding coding, TSeqPos length)
SIZE_TYPE convert_1_to_1(const char *src, TSeqPos pos, TSeqPos length, char *dst, const Uint1 *table)
SIZE_TYPE revcmp(char *buf, TSeqPos pos, TSeqPos length, const Uint1 *table)