A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ascii85_8cpp_source.html below:

NCBI C++ ToolKit: src/util/ascii85.cpp Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

41  char

* dst_buf,

size_t

dst_len

44  if

(!src_buf || !src_len) {

47  if

(!dst_buf || !dst_len) {

51  char

* dst_ptr = dst_buf;

52  const char

* src_ptr = src_buf;

53  const char

* src_end = src_buf + src_len;

55  while

(src_ptr < src_end) {

56  unsigned long val

= 0;

60  for

(; bytes < 4 && src_ptr < src_end; ++bytes) {

61  val

= (

val

<< 8) | (

unsigned char

)(*src_ptr++);

65  val

<<= (4 - bytes) * 8;

67  if

(

val

== 0 && bytes == 4) {

68  if

(dst_len < 1)

break

;

76  for

(

int i

= 4;

i

>= 0; --

i

) {

77  out

[

i

] = (char)((

val

% 85) +

'!'

);

81  int

out_len = bytes + 1;

82  if

(dst_len < (

size_t

)out_len) {

83  _TRACE

(

Info

<<

"insufficient buffer space provided\n"

);

86

memcpy(dst_ptr,

out

, out_len);

92  _TRACE

(

Info

<<

"insufficient buffer space provided\n"

);

99  return

dst_ptr - dst_buf;

static size_t s_Encode(const char *src_buf, size_t src_len, char *dst_buf, size_t dst_len)

std::ofstream out("events_result.xml")

main entry point for tests

void Info(CExceptionArgs_Base &args)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4