1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Command-line text steganography tool.
//!
//! # Example
//!
//! ```sh
//! # view contents of `input.txt`
//! $ cat input.txt
//! The Hitchhiker's Guide to the Galaxy is a 1979 science fiction comedy
//! novel by English author Douglas Adams, adapted from the first four parts
//! of his radio comedy series of the same name. It centres on the
//! misadventures of Arthur Dent, the only man to survive the destruction of
//! Earth, as he roams the cosmos and learns the truth behind his very
//! existence. The novel's namesake is an in-universe electronic travel
//! guide written in the form of an encyclopaedia, through which the story
//! is framed.
//!
//! # check capacity
//! $ cargo run -q --bin stegtext capacity < input.txt
//! 23
//!
//! # embed secret, write results to `encoded.txt`
//! $ cargo run -q --bin stegtext encode 'secret message' < input.txt > encoded.txt
//!
//! # view contents of `encoded.txt`
//! $ cat encoded.txt
//! Тhe Нitchhіkеr'ѕ Guide to the Galaxy іѕ a 1979 sсіеncе fiсtion соmedу
//! nоvel by Englіѕh author Dоuglas Аdаmѕ, adаptеd from the fіrѕt four partѕ
//! of hіѕ rаdio comedy ѕeriеs оf thе sаmе namе. It сentreѕ оn the
//! mіѕadventurеѕ оf Arthur Dеnt, thе only mаn tо ѕurvivе the destructіоn of
//! Еаrth, аs he rоаms thе cоsmoѕ аnd learns the truth behind his very
//! existence. The novel's namesake is an in-universe electronic travel
//! guide written in the form of an encyclopaedia, through which the story
//! is framed.
//!
//! # extract secret from `encoded.txt`
//! $ cargo run -q --bin stegtext decode < encoded.txt
//! secret message
//! ```
use ;
/// Text steganography tool.