This function returns the contents of the file 'stuff.bin' but using the old floating point serialization format.
| 489 | // This function returns the contents of the file 'stuff.bin' but using the old |
| 490 | // floating point serialization format. |
| 491 | const std::string get_decoded_string() |
| 492 | { |
| 493 | dlib::base64::kernel_1a base64_coder; |
| 494 | dlib::compress_stream::kernel_1ea compressor; |
| 495 | std::ostringstream sout; |
| 496 | std::istringstream sin; |
| 497 | |
| 498 | |
| 499 | // The base64 encoded data from the file 'stuff.bin' we want to decode and return. |
| 500 | sout << "AVaifX9zEbXa9aocsrcRuvnNrR3WLuuU5eLWiy0UeXmnKXGLKZz8V44gzT4CM6wnCmAHFQug8G3C"; |
| 501 | sout << "4cuLdNgp2ApkeLcvwFNJRENE0ShrRaxEBFEA8nah7vm8B2VmgImNblCejuP5IcDt60EaCKlqiit8"; |
| 502 | sout << "+JGrzYxqBm3xFS4P+qlOROdbxc7pXBmUdh0rqNSEvn0FBPdoqY/5SpHgA2yAcH8XFrM1cdu0xS3P"; |
| 503 | sout << "8PBcmLMJ7bFdzplwhrjuxtm4NfEOi6Rl9sU44AXycYgJd0+uH+dyoI9X3co5b3YWJtjvdVeztNAr"; |
| 504 | sout << "BfSPfR6oAVNfiMBG7QA="; |
| 505 | |
| 506 | |
| 507 | // Put the data into the istream sin |
| 508 | sin.str(sout.str()); |
| 509 | sout.str(""); |
| 510 | |
| 511 | // Decode the base64 text into its compressed binary form |
| 512 | base64_coder.decode(sin,sout); |
| 513 | sin.clear(); |
| 514 | sin.str(sout.str()); |
| 515 | sout.str(""); |
| 516 | |
| 517 | // Decompress the data into its original form |
| 518 | compressor.decompress(sin,sout); |
| 519 | |
| 520 | // Return the decoded and decompressed data |
| 521 | return sout.str(); |
| 522 | } |
| 523 | |
| 524 | |
| 525 | // This function returns the contents of the file 'stuff.bin' but using the new |
no test coverage detected