1 #ifndef OBJTOOLS_WRITERS_WRITEDB__WRITEDB_CONVERT_HPP
2 #define OBJTOOLS_WRITERS_WRITEDB__WRITEDB_CONVERT_HPP
146 buf[0] = (x >> 24) & 0xFF;
147 buf[1] = (x >> 16) & 0xFF;
148 buf[2] = (x >> 8) & 0xFF;
160 buf[0] = (x >> 24) & 0xFF;
161 buf[1] = (x >> 16) & 0xFF;
162 buf[2] = (x >> 8) & 0xFF;
174 buf[7] = (char)((x >> 56) & 0xFF);
175 buf[6] = (char)((x >> 48) & 0xFF);
176 buf[5] = (char)((x >> 40) & 0xFF);
177 buf[4] = (char)((x >> 32) & 0xFF);
178 buf[3] = (char)((x >> 24) & 0xFF);
179 buf[2] = (char)((x >> 16) & 0xFF);
180 buf[1] = (char)((x >> 8) & 0xFF);
181 buf[0] = (char)((x ) & 0xFF);
192 buf[0] = (char)((x >> 56) & 0xFF);
193 buf[1] = (char)((x >> 48) & 0xFF);
194 buf[2] = (char)((x >> 40) & 0xFF);
195 buf[3] = (char)((x >> 32) & 0xFF);
196 buf[4] = (char)((x >> 24) & 0xFF);
197 buf[5] = (char)((x >> 16) & 0xFF);
198 buf[6] = (char)((x >> 8) & 0xFF);
199 buf[7] = (char)((x ) & 0xFF);
214 str.write(s.data(), s.length());
static int base_length[29]
static const char si[8][64]
static const char * str(char *buf, int n)
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void s_WriteInt8BE(ostream &str, Uint8 x)
Write an eight byte integer to a stream in big-endian format.
USING_SCOPE(objects)
Import definitions from the objects namespace.
void s_WriteInt4(ostream &str, int x)
Write a four byte integer to a stream in big endian format.
void s_WriteInt8LE(ostream &str, Uint8 x)
Write an eight byte integer to a stream in little-endian format.
void WriteDB_Ncbi2naToBinary(const CSeq_inst &si, string &seq)
Build blast db nucleotide format from Ncbi2na Seq-inst.
void s_WriteString(ostream &str, const string &s)
Write a length-prefixed string to a stream.
void WriteDB_EaaToBinary(const CSeq_inst &si, string &seq)
Build blast db protein format from Eaa protein Seq-inst.
void WriteDB_IupacaaToBinary(const CSeq_inst &si, string &seq)
Build blast db protein format from Iupacaa protein Seq-inst.
void WriteDB_Ncbi4naToBinary(const CSeq_inst &seqinst, string &seq, string &amb)
Build blast db nucleotide format from Ncbi4na Seq-inst.
void s_AppendInt4(string &outp, int x)
Append a value to a string as a 4 byte big-endian integer.
void WriteDB_StdaaToBinary(const CSeq_inst &si, string &seq)
Build blast db protein format from Stdaa protein Seq-inst.
void WriteDB_IupacnaToBinary(const CSeq_inst &si, string &seq, string &amb)
Build blast db nucleotide format from Iupacna Seq-inst.