Skip to content

Commit e5edba0

Browse files
author
Grok Compression
committed
examples: add more documentation
1 parent 3350326 commit e5edba0

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@
171171
"miDebuggerPath": "/usr/bin/gdb"
172172
},
173173
{
174-
"name": "core compress decompress",
174+
"name": "core simple",
175175
"type": "cppdbg",
176176
"request": "launch",
177-
"program": "${workspaceFolder}/build/bin/core_compress_decompress",
177+
"program": "${workspaceFolder}/build/bin/core_simple",
178178
"args": [],
179179
"environment": [
180180
{ "name": "GRK_DEBUG", "value": "3" }

examples/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include_directories(
88

99
foreach(exe core_decompress
1010
core_compress
11-
core_compress_decompress
11+
core_simple
1212
)
1313
add_executable(${exe} ${exe}.cpp ${common_SRCS})
1414
target_compile_options(${exe} PRIVATE ${GROK_COMPILE_OPTIONS})

examples/core/core_compress.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*
1616
*/
17+
18+
/*********************************************************************
19+
20+
Example demonstrating compression from a memory buffer using one
21+
of three approaches for the destination:
22+
23+
1) memory buffer
24+
2) memory buffer using callbacks
25+
3) file
26+
27+
**********************************************************************/
28+
1729
#include <cstdio>
1830
#include <cstring>
1931
#include <memory>

examples/core/core_decompress.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
*
1616
*/
1717

18+
/*************************************************************************
19+
20+
Complex example demonstrating a variety of options for decompression
21+
22+
**************************************************************************/
23+
1824
#include <cstdio>
1925
#include <string>
2026
#include <cstring>

examples/core/core_compress_decompress.cpp renamed to examples/core/core_simple.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*
1616
*/
17+
18+
/***********************************************************
19+
20+
Simple example demonstrating compression and decompression
21+
with memory buffers as source and destination
22+
23+
************************************************************/
24+
1725
#include <cstdio>
1826
#include <cstring>
1927
#include <memory>

0 commit comments

Comments
 (0)