From e24c996affd0bf5ff34b66399a99de6a1b98b00a Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Fri, 24 Aug 2018 19:23:25 +0200 Subject: [PATCH] Initial commit --- .vscode/settings.json | 27 ++++++++++++++++ codebreak.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++ test/46zeros.txt | Bin 0 -> 46 bytes test/46zeros_enc.txt | Bin 0 -> 50 bytes test/data1.txt | 5 +++ test/data1_enc.txt | 2 ++ test/data2.txt | 1 + test/data2_enc.txt | Bin 0 -> 28 bytes test/data3.txt | 1 + test/data3_enc.txt | 1 + test/data4.txt | 1 + test/data4_enc.txt | 1 + test/secondtry.txt | 1 + 13 files changed, 113 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 codebreak.cpp create mode 100644 test/46zeros.txt create mode 100644 test/46zeros_enc.txt create mode 100644 test/data1.txt create mode 100644 test/data1_enc.txt create mode 100644 test/data2.txt create mode 100644 test/data2_enc.txt create mode 100644 test/data3.txt create mode 100644 test/data3_enc.txt create mode 100644 test/data4.txt create mode 100644 test/data4_enc.txt create mode 100644 test/secondtry.txt diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..43e9032 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,27 @@ +{ + "files.associations": { + "*.tcc": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "exception": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "ostream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "type_traits": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/codebreak.cpp b/codebreak.cpp new file mode 100644 index 0000000..60f06ce --- /dev/null +++ b/codebreak.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include +#include + +std::string load_file(std::string filename, size_t end_cut = 0) +{ + std::stringstream ret; + std::ifstream file(filename); + while(file.good()) + { + ret<<(char)file.get(); + } + auto rret = ret.str(); + rret.resize(rret.size()-end_cut); + return rret; +} + +int main(int argc, char** argv) +{ + std::vector params; + for(int i=0;il|^X`lz8 literal 0 HcmV?d00001 diff --git a/test/data3.txt b/test/data3.txt new file mode 100644 index 0000000..1656f92 --- /dev/null +++ b/test/data3.txt @@ -0,0 +1 @@ +abcdefgh \ No newline at end of file diff --git a/test/data3_enc.txt b/test/data3_enc.txt new file mode 100644 index 0000000..f0710d5 --- /dev/null +++ b/test/data3_enc.txt @@ -0,0 +1 @@ +*,.02468)d(œ \ No newline at end of file diff --git a/test/data4.txt b/test/data4.txt new file mode 100644 index 0000000..c0c5e67 --- /dev/null +++ b/test/data4.txt @@ -0,0 +1 @@ +hgfedcba \ No newline at end of file diff --git a/test/data4_enc.txt b/test/data4_enc.txt new file mode 100644 index 0000000..09eae28 --- /dev/null +++ b/test/data4_enc.txt @@ -0,0 +1 @@ +11111111j'œ \ No newline at end of file diff --git a/test/secondtry.txt b/test/secondtry.txt new file mode 100644 index 0000000..b41de06 --- /dev/null +++ b/test/secondtry.txt @@ -0,0 +1 @@ +2XZU^Yc:`fhm\qo FsqpqfmlMtzn‚~‡JLD" y“‰€2ÏÑ \ No newline at end of file