(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Wolfram 15.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       154,          7]
NotebookDataLength[     52940,       1395]
NotebookOptionsPosition[     43961,       1228]
NotebookOutlinePosition[     46038,       1277]
CellTagsIndexPosition[     45960,       1272]
WindowTitle->ImageAppendedData
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {GridBox[{
      {
       ItemBox[Cell[BoxData[
         RowBox[{
          TemplateBox[{12},
           "Spacer1"], Cell[
          "WOLFRAM INSTITUTE/ PUZZLES SYMBOL", "PacletNameCell",
           TextAlignment->Center,ExpressionUUID->
           "4028aa09-7b33-4bae-8b4c-7495f1a71bf3"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "680622cc-91e9-421b-8963-c8fca47520c2"],
        Background->LightDarkSwitched[
          RGBColor[0.490196, 0.576471, 0.690196]],
        ItemSize->Full], ""}
     },
     GridBoxAlignment->{"Rows" -> {{Center}}},
     GridBoxItemSize->{"Columns" -> {Full, 
         Scaled[0.02]}, "Rows" -> {{2.5}}}], Cell[TextData[{
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "See Also",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "b40f731f-2721-4609-b316-4c2de7df3fe1"]
         }],ExpressionUUID->"44703a65-7037-4308-999c-a34c79c59f8c"],
         StripOnInput->False],{
        StyleBox[
          "\"ReadByteArray\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup["paclet:ref/ReadByteArray"], Delimiter, 
         StyleBox[
          "\"Functions\"", "SeeAlsoSection", FontSize -> 14, FontSlant -> 
           "Italic", StripOnInput -> False] :> 
         NotebookFind[EvaluationNotebook[], "SeeAlsoSection", All, CellStyle],
          StyleBox[
          StyleBox[
           "\"ImageContainerChunks\"", "SeeAlsoRelated", StripOnInput -> 
            False], "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/ImageContainerChunks"], 
         StyleBox[
          StyleBox[
           "\"EmbeddedFileSignatures\"", "SeeAlsoRelated", StripOnInput -> 
            False], "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/EmbeddedFileSignatures"], 
         StyleBox[
          StyleBox[
           "\"ByteArrayStrings\"", "SeeAlsoRelated", StripOnInput -> False], 
           "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/ByteArrayStrings"], 
         StyleBox[
          StyleBox[
           "\"SteganographySurvey\"", "SeeAlsoRelated", StripOnInput -> 
            False], "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/SteganographySurvey"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "84f70ef5-d4de-4998-ba72-9e06bda53049"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "Related Guides",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "fbb55e4f-f9d0-427b-aadc-236e3c06877e"]
         }],ExpressionUUID->"6012e589-8efd-42bd-8fc8-520c3097ff6d"],
         StripOnInput->False],{
        "\"Steganography\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Steganography"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "91c35cc7-3457-4ba1-86a8-33f021271722"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "URL",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "14033376-2a52-493d-83a1-70ae0dcc17ce"]
         }],ExpressionUUID->"d80f9c28-d0da-4344-aace-d739e06a7027"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/ImageAppendedData\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/ImageAppendedData"], 
         Delimiter, "\"Copy web URL\"" :> 
         Module[{DocumentationSearch`Private`nb$}, 
           DocumentationSearch`Private`nb$ = 
            NotebookPut[
             Notebook[{
               Cell[BoxData[
                 MakeBoxes[
                  Hyperlink[
                   "http://reference.wolfram.com/language/WolframInstitute/\
Puzzles/ref/ImageAppendedData.html"], StandardForm]], "Input", 
                 TextClipboardType -> "PlainText"]}, Visible -> False]]; 
           SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
           FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
           NotebookClose[DocumentationSearch`Private`nb$]; Null], 
         "\"Go to web URL\"" :> 
         FrontEndExecute[{
           NotebookLocate[{
             URL[If[TrueQ[False], 
                 "http://reference.wolfram.com/system-modeler/", 
                 "http://reference.wolfram.com/language/"] <> 
               "WolframInstitute/Puzzles/ref/ImageAppendedData" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "3cde97b3-2f04-4ddd-968d-9e4800e42e72"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "5e7627d2-95f5-4004-b0df-eab3e6cb4a8d"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"e9657d6f-5a89-4da4-8554-9889512340ec"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"f855dad1-e329-4597-88ca-34edf4924fd8"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "ImageAppendedData", "ObjectName",ExpressionUUID->
      "d15fd709-6b62-4772-89ee-d735dbeb4c29"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"8182ba99-0069-406b-9d4a-8219232a081f"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "0ba3531c-9cb4-4913-a845-c0739dfdb5b3"]
    }],ExpressionUUID->"053047a5-b139-4174-96d5-8e49e3bf0f5e"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"e3aadc41-fe57-46b1-874f-\
177ee0aeb7d2"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["ImageAppendedData"]], 
         "paclet:WolframInstitute/Puzzles/ref/ImageAppendedData", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       StyleBox["source", "TI"], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "da3458b6-afbf-4843-960c-c77ff03d71b4"],
     "\[LineSeparator]",
     "gives the bytes of an image file that follow the container's declared \
end, as a ",
     Cell[BoxData[
      TemplateBox[{
        Cell[
         TextData["ByteArray"]], "paclet:ref/ByteArray"},
       "RefLink",
       BaseStyle->"InlineFormula"]], "InlineFormula",
      FontFamily->"Source Sans Pro",ExpressionUUID->
      "b7f5471c-3673-4c79-a858-de1c41e59705"],
     "."
    }],ExpressionUUID->"c11e3f93-ab55-41b5-a745-e435a80de7c6"]}
  }]], "Usage",ExpressionUUID->"fee634bf-3052-46c9-abbe-cd5de861358f"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[Cell[TextData[{
  Cell[BoxData[
   DynamicBox[ToBoxes[
     If[CurrentValue[
        EvaluationCell[], "CellGroupOpen"] =!= Closed, 
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], 
      Rotate[
       Style[
        Graphics[{
          Thickness[0.18], 
          RGBColor[0.8509803921568627, 0.396078431372549, 0], 
          Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
         PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
        0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
    ImageSizeCache->{
     13.600000000000001`, {-0.1685058593749993, 13.768505859375}}]],
   ExpressionUUID->"5611ca0e-83db-4148-9e03-6efa53f3810e"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"2fcf2525-3f9f-4eaa-b515-d873b3b247d5"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "d4aa53a7-737d-42e0-8ee7-5cd58b6d5418"]],ExpressionUUID->"633bb9c0-02e3-\
4797-90f7-464c69aa7257"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->405999952,ExpressionUUID->"c6c1423d-3b49-42b4-ada1-1d4cc0185c29"],

Cell[TextData[{
 StyleBox["source", "TI"],
 " is a ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["File"]], "paclet:ref/File"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "6a46271a-4792-4b71-9f8f-8628cca68165"],
 ", a file path, or a ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["ByteArray"]], "paclet:ref/ByteArray"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "3f45e9b0-8b74-4f17-949d-e329f386b81d"],
 "."
}], "Notes",ExpressionUUID->"8e60e463-7435-412e-a092-a459d911f5cd"],

Cell["\<\
The declared end is the last byte of the PNG IEND chunk, of the JPEG EOI \
marker, or of the GIF trailer.\
\>", "Notes",ExpressionUUID->"4d4083d2-40ad-4a20-89fe-f81b8631d5e0"],

Cell[TextData[{
 "The result is an empty ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["ByteArray"]], "paclet:ref/ByteArray"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "d338ea84-2d7e-47d6-b1ef-34d8d2d3b5e2"],
 " when the file ends where its container does."
}], "Notes",ExpressionUUID->"f6c5b5dc-a145-4748-96ca-83b2869f8962"],

Cell["\<\
Every image decoder stops at the declared end, so appended bytes are \
invisible to normal use and the file still opens as a picture. This is the \
oldest and most common way to hide a file inside an image, and the whole \
trick behind an image that is also a working archive.\
\>", "Notes",ExpressionUUID->"cd1be1ee-2619-4e59-b74f-3f0836478eb5"],

Cell[TextData[{
 "A source that is not a PNG, JPEG or GIF gives a ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["Failure"]], "paclet:ref/Failure"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "c078f429-c297-4fa8-974a-f648fe69309d"],
 "; a first argument that is not a source at all matches no definition and is \
returned unevaluated."
}], "Notes",ExpressionUUID->"0e8df280-d4b5-4c26-ae2a-56772ad32ff2"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"75e30972-713e-4672-a6d7-d0149e114a91"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[
     MatchQ[
      CurrentValue[
       EvaluationNotebook[], {
       TaggingRules, "Openers", "PrimaryExamplesSection"}, Open], 
      Alternatives[True, Open]], 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
   ImageSizeCache->{
    13.600000000000001`, {4.251494140625001, 9.348505859375}}]],
  ExpressionUUID->"fcf7e376-ccae-4221-87ec-54bcfd04eb19"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"ec8fbb24-6b53-437b-9c8b-293a659b9880"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(11)", "ExampleCount",ExpressionUUID->
  "505e20cc-ff89-4f5d-832a-4a7914552875"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1085646745,ExpressionUUID->"bdff6ba8-b4d2-4c28-b157-469ef9240dbc"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"ad2c0da8-c98c-4b31-b2bb-1a131f48eed1"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "22f24c4c-a079-457b-b4c7-82cc93e2532c"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"8ebbcdc5-6911-437f-8a0b-01af8608af7c"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "a7990f25-a418-4d12-99c0-5da1dfcf2a78"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1443778303,ExpressionUUID->"2bda1db5-fb87-499b-9add-507252c44d01"],

Cell["\<\
A file the kernel just wrote has nothing after its container, so the result \
is empty:\
\>", "ExampleText",
 CellTags->
  "TextAnnotation",ExpressionUUID->"0c129003-419e-4899-97a3-2d75dba7fe69"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{"ImageAppendedData", "[", 
   RowBox[{"ExportByteArray", "[", 
    RowBox[{
     RowBox[{"Image", "[", 
      RowBox[{
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
         RowBox[{"{", 
          RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
         RowBox[{"{", 
          RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
       " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"bb9a2b6e-41ad-43f6-a108-159c6476f78b"],

Cell[BoxData["0"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"d32c6ab5-d576-4173-b8ba-c30cd84d4d48"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "909366b3-5c97-457a-911c-cd4e56cbe977"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"e615c1d4-5999-419f-\
8505-7b2d2c713bea"],

Cell["\<\
Sticking a note on the end of the same file recovers exactly that note:\
\>", "ExampleText",ExpressionUUID->"55ccf90f-c877-4175-a8ba-a25d6bf0b24f"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteArrayToString", "[", 
  RowBox[{"ImageAppendedData", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{"Join", "[", 
     RowBox[{
      RowBox[{"Normal", "[", 
       RowBox[{"ExportByteArray", "[", 
        RowBox[{
         RowBox[{"Image", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
             
             RowBox[{"{", 
              RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
             RowBox[{"{", 
              RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
           " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], 
       "]"}], ",", " ", 
      RowBox[{
      "ToCharacterCode", "[", "\"\<the key is under the mat\>\"", "]"}]}], 
     "]"}], "]"}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"c23df5b2-c0e5-4bbf-a11a-6d14b112325f"],

Cell[BoxData["\<\"the key is under the mat\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"95eb46f8-eadf-4c81-a92a-37f0c5df3da0"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "f3c8de7f-1051-4103-a4b2-85990ec85a90"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"37c22152-b8bf-47aa-\
b38e-c46e7f0fd259"],

Cell["The image still decodes, which is why the trick works:", "ExampleText",ExpressionUUID->"55ec31dd-051a-472f-8eaf-8540d7de8963"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ImageDimensions", "[", 
  RowBox[{"ImportByteArray", "[", 
   RowBox[{
    RowBox[{"ByteArray", "[", 
     RowBox[{"Join", "[", 
      RowBox[{
       RowBox[{"Normal", "[", 
        RowBox[{"ExportByteArray", "[", 
         RowBox[{
          RowBox[{"Image", "[", 
           RowBox[{
            RowBox[{"Table", "[", 
             RowBox[{
              RowBox[{"{", 
               RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
              RowBox[{"{", 
               RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
              RowBox[{"{", 
               RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
            " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], 
        "]"}], ",", " ", 
       RowBox[{
       "ToCharacterCode", "[", "\"\<the key is under the mat\>\"", "]"}]}], 
      "]"}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"df63a862-3149-4de6-a69a-96bb211b9d67"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"16", ",", "16"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"05366f19-d8e2-404e-b3b2-47f068377de2"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "c465160b-a008-470f-8e6f-b26799444283"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"0a54965d-71a8-41d6-a792-47d8462aed5a"],
 "Scope",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "aa206953-87d6-406e-a539-e9dc253599b8"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1293636265,ExpressionUUID->"7a52bd09-3424-4d91-af01-f7dc350e6f0c"],

Cell["A JPEG's declared end is the EOI marker:", "ExampleText",ExpressionUUID->"19e6ab3c-be6d-4e66-98f3-269d82f59ab7"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteArrayToString", "[", 
  RowBox[{"ImageAppendedData", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{"Join", "[", 
     RowBox[{
      RowBox[{"Normal", "[", 
       RowBox[{"ExportByteArray", "[", 
        RowBox[{
         RowBox[{"Image", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
             
             RowBox[{"{", 
              RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
             RowBox[{"{", 
              RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
           " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<JPEG\>\""}], "]"}], 
       "]"}], ",", " ", 
      RowBox[{
      "ToCharacterCode", "[", "\"\<after the end of image marker\>\"", 
       "]"}]}], "]"}], "]"}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"d8cd89d2-b55b-42d8-8abe-7cb5956d221b"],

Cell[BoxData["\<\"after the end of image marker\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"521260ad-3ce7-426d-8904-2d0aafd83295"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "9a9cb290-ad45-4023-8091-e708f4fcc2f4"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"5f8e7739-ac81-4db1-\
8b70-92c7b24272f0"],

Cell["A GIF's is the one-byte trailer:", "ExampleText",ExpressionUUID->"e5f78f18-2292-43d4-82c6-fdc75868af2a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteArrayToString", "[", 
  RowBox[{"ImageAppendedData", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{"Join", "[", 
     RowBox[{
      RowBox[{"Normal", "[", 
       RowBox[{"ExportByteArray", "[", 
        RowBox[{
         RowBox[{"Image", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
             
             RowBox[{"{", 
              RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
             RowBox[{"{", 
              RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
           " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<GIF\>\""}], "]"}], 
       "]"}], ",", " ", 
      RowBox[{"ToCharacterCode", "[", "\"\<after the trailer\>\"", "]"}]}], 
     "]"}], "]"}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"80ca4aed-d040-4afd-a383-a7209a582b91"],

Cell[BoxData["\<\"after the trailer\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"583af2c0-4b67-49a4-946e-75d2437702ef"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "0a4b2869-20e0-4df3-b40f-02951e698e6a"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"e87dfda8-9f8a-4b2e-a81b-8c29272e7ecf"],
 "Applications",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "2ebe43ed-2bba-4688-a38c-047cf05d7942"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->258228157,ExpressionUUID->"0cbf10d7-8677-43bb-9b18-6e8b0af62454"],

Cell[TextData[{
 "Appended bytes are often a whole file. ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["EmbeddedFileSignatures"]], 
    "paclet:WolframInstitute/Puzzles/ref/EmbeddedFileSignatures", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "6fff7aee-38b9-4d16-9b92-e4db552c54c2"],
 " says what kind:"
}], "ExampleText",ExpressionUUID->"39dbfef1-0d19-4802-b89b-cbbd5cb231fd"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Lookup", "[", 
  RowBox[{
   RowBox[{"EmbeddedFileSignatures", "[", 
    RowBox[{"ImageAppendedData", "[", 
     RowBox[{"ByteArray", "[", 
      RowBox[{"Join", "[", 
       RowBox[{
        RowBox[{"Normal", "[", 
         RowBox[{"ExportByteArray", "[", 
          RowBox[{
           RowBox[{"Image", "[", 
            RowBox[{
             RowBox[{"Table", "[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", 
               " ", 
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
               RowBox[{"{", 
                RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
             " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], 
         "]"}], ",", " ", 
        RowBox[{"Normal", "[", 
         RowBox[{"ExportByteArray", "[", 
          RowBox[{
           RowBox[{"Image", "[", 
            RowBox[{
             RowBox[{"Table", "[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "j", ",", " ", "200"}], "}"}], ",", 
               " ", 
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "4"}], "}"}], ",", " ", 
               RowBox[{"{", 
                RowBox[{"j", ",", " ", "4"}], "}"}]}], "]"}], ",", 
             " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<GIF\>\""}], "]"}], 
         "]"}]}], "]"}], "]"}], "]"}], "]"}], ",", " ", "\"\<Format\>\""}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"27c2a0f2-1142-4f1e-bfd8-604ded0a3865"],

Cell[BoxData[
 RowBox[{"{", "\<\"GIF89a\"\>", "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"a02e2c2c-86ce-4234-bc9b-cb51a7fd7c66"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "a16c3319-b5fd-4dd7-86de-4eedc1bc8cb2"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"aedc4897-8030-436c-\
81a1-5f88c85ad7ba"],

Cell["\<\
An appended image can be opened straight out of the recovered bytes:\
\>", "ExampleText",ExpressionUUID->"dfe4d437-d0aa-44fb-8ee1-155e782f29a4"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ImageDimensions", "[", 
  RowBox[{"ImportByteArray", "[", 
   RowBox[{
    RowBox[{"ImageAppendedData", "[", 
     RowBox[{"ByteArray", "[", 
      RowBox[{"Join", "[", 
       RowBox[{
        RowBox[{"Normal", "[", 
         RowBox[{"ExportByteArray", "[", 
          RowBox[{
           RowBox[{"Image", "[", 
            RowBox[{
             RowBox[{"Table", "[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", 
               " ", 
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
               RowBox[{"{", 
                RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
             " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], 
         "]"}], ",", " ", 
        RowBox[{"Normal", "[", 
         RowBox[{"ExportByteArray", "[", 
          RowBox[{
           RowBox[{"Image", "[", 
            RowBox[{
             RowBox[{"Table", "[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "j", ",", " ", "200"}], "}"}], ",", 
               " ", 
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "4"}], "}"}], ",", " ", 
               RowBox[{"{", 
                RowBox[{"j", ",", " ", "4"}], "}"}]}], "]"}], ",", 
             " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<GIF\>\""}], "]"}], 
         "]"}]}], "]"}], "]"}], "]"}], ",", " ", "\"\<GIF\>\""}], "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"63a98201-9d71-4796-896e-644121c85649"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"4", ",", "4"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"41b0ba06-2428-4144-bb31-949503948ba1"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "b311dc62-6748-4c44-84fc-8bcedacd30f5"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"aed7fe24-2dcd-4775-95ad-46f8d5bf143d"],
 "Properties & Relations",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "9b24922f-3822-4139-bfdd-9536fb29e8bc"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2123667759,ExpressionUUID->"a41d2910-913f-4bea-9452-c579af601b8a"],

Cell["\<\
The appended region starts where the last container unit ends:\
\>", "ExampleText",ExpressionUUID->"37c296d4-2de6-4ae8-b642-86a2dbc23171"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Length", "[", 
    RowBox[{"ExportByteArray", "[", 
     RowBox[{
      RowBox[{"Image", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
        " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], "]"}],
    " ", "-", " ", 
   RowBox[{"Length", "[", 
    RowBox[{"ImageAppendedData", "[", 
     RowBox[{"ByteArray", "[", 
      RowBox[{"Join", "[", 
       RowBox[{
        RowBox[{"Normal", "[", 
         RowBox[{"ExportByteArray", "[", 
          RowBox[{
           RowBox[{"Image", "[", 
            RowBox[{
             RowBox[{"Table", "[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", 
               " ", 
               RowBox[{"{", 
                RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
               RowBox[{"{", 
                RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
             " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], 
         "]"}], ",", " ", 
        RowBox[{"ToCharacterCode", "[", "\"\<tail\>\"", "]"}]}], "]"}], "]"}],
      "]"}], "]"}]}], " ", "===", " ", 
  RowBox[{
   RowBox[{"Length", "[", 
    RowBox[{"ExportByteArray", "[", 
     RowBox[{
      RowBox[{"Image", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
        " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], "]"}],
    " ", "-", " ", "4"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"5131c04d-db94-41d6-9f0f-eacaf6bd04b8"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"b5a5aa1a-bed0-4775-abab-988174af0108"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "84dd222d-1b66-4322-8f89-f607539648e9"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"9f20167d-db52-47ab-\
be59-313783f72a27"],

Cell[TextData[{
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["SteganographySurvey"]], 
    "paclet:WolframInstitute/Puzzles/ref/SteganographySurvey", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "4959bbe9-80b1-4677-adc8-cbb1e2413331"],
 " reports a non-empty result as a definite finding, the only confidence in \
the battery that is not a statistic:"
}], "ExampleText",ExpressionUUID->"4e311eac-5168-411e-8368-77df7a16aa43"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"First", "[", 
   RowBox[{"Cases", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"SteganographySurvey", "[", 
       RowBox[{"ByteArray", "[", 
        RowBox[{"Join", "[", 
         RowBox[{
          RowBox[{"Normal", "[", 
           RowBox[{"ExportByteArray", "[", 
            RowBox[{
             RowBox[{"Image", "[", 
              RowBox[{
               RowBox[{"Table", "[", 
                RowBox[{
                 RowBox[{"{", 
                  RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", 
                 " ", 
                 RowBox[{"{", 
                  RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
                 RowBox[{"{", 
                  RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
               " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}],
            "]"}], ",", " ", 
          RowBox[{
          "ToCharacterCode", "[", "\"\<the key is under the mat\>\"", "]"}]}],
          "]"}], "]"}], "]"}], "[", "\"\<Findings\>\"", "]"}], ",", " ", 
     RowBox[{"KeyValuePattern", "[", 
      RowBox[{"\"\<Test\>\"", " ", "->", " ", "\"\<AppendedData\>\""}], 
      "]"}]}], "]"}], "]"}], "[", "\"\<Confidence\>\"", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"b193122f-d66d-49da-a706-add55b5e1bfd"],

Cell[BoxData["\<\"Definite\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"9d43980e-6211-4794-a892-8e0a280addda"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "fa93213d-069e-46d3-af96-1be3e7854aea"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"c2669e92-b8c8-4e5e-b99c-b60ac6225b2e"],
 "Possible Issues",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "099ebfc5-f868-4459-b7ea-c48d448cd1f2"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1305812373,ExpressionUUID->"e3f84584-efdf-428d-9e8c-fa24c6d0b1de"],

Cell["\<\
Appended bytes are not always a payload. Some encoders and upload pipelines \
pad a file, and a survey reports the finding as definite only because the \
bytes are definitely there, not because someone definitely put them there on \
purpose.\
\>", "ExampleText",ExpressionUUID->"d0c5e373-1218-4892-b7ac-c7518a33fa07"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Lookup", "[", 
  RowBox[{
   RowBox[{"First", "[", 
    RowBox[{
     RowBox[{"SteganographySurvey", "[", 
      RowBox[{"ByteArray", "[", 
       RowBox[{"Join", "[", 
        RowBox[{
         RowBox[{"Normal", "[", 
          RowBox[{"ExportByteArray", "[", 
           RowBox[{
            RowBox[{"Image", "[", 
             RowBox[{
              RowBox[{"Table", "[", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{"i", ",", " ", "j", ",", " ", "128"}], "}"}], ",", 
                " ", 
                RowBox[{"{", 
                 RowBox[{"i", ",", " ", "16"}], "}"}], ",", " ", 
                RowBox[{"{", 
                 RowBox[{"j", ",", " ", "16"}], "}"}]}], "]"}], ",", 
              " ", "\"\<Byte\>\""}], "]"}], ",", " ", "\"\<PNG\>\""}], "]"}], 
          "]"}], ",", " ", 
         RowBox[{"{", 
          RowBox[{"0", ",", " ", "0", ",", " ", "0", ",", " ", "0"}], "}"}]}],
         "]"}], "]"}], "]"}], "[", "\"\<Findings\>\"", "]"}], "]"}], ",", 
   " ", "\"\<FalsePositives\>\""}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"9984033f-53d6-49c2-9030-66b97244727a"],

Cell[BoxData["\<\"Some encoders and upload pipelines pad a file past its \
container; read the bytes before concluding anything.\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"b81fa361-3fc6-4162-88d8-66f631fbc962"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "74b61ce7-55bf-41c9-8b25-7f0954c4ade9"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"b6d06bcc-3f5c-47b9-\
9730-4c8fb68774f7"],

Cell[TextData[{
 "A source that is not one of the three containers gives a ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["Failure"]], "paclet:ref/Failure"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "77a82131-e351-4864-a37b-4787b446e4a7"],
 ":"
}], "ExampleText",ExpressionUUID->"c4b9b4fe-49e5-4c49-a887-cf5fe707a727"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"FailureQ", "[", 
  RowBox[{"ImageAppendedData", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{"ToCharacterCode", "[", "\"\<not a container\>\"", "]"}], "]"}], 
   "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"42656cf0-c8dd-4599-8a8a-40796cf36f93"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"3b6e1991-316b-49fc-8106-be424a0cfbc9"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedFunction.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"See", " ", "Also"}], "SeeAlsoSection"]},
      {Cell[TextData[{
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["ImageContainerChunks"]], 
           "paclet:WolframInstitute/Puzzles/ref/ImageContainerChunks", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "e6a131df-3983-49cc-ae49-d93a9852615f"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["EmbeddedFileSignatures"]], 
           "paclet:WolframInstitute/Puzzles/ref/EmbeddedFileSignatures", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "bb58681b-a9a0-4ca3-9f3d-30a008e28f2d"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["ByteArrayStrings"]], 
           "paclet:WolframInstitute/Puzzles/ref/ByteArrayStrings", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "c0468ff2-8df6-4c31-90e1-093f0499d86f"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["SteganographySurvey"]], 
           "paclet:WolframInstitute/Puzzles/ref/SteganographySurvey", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "7fbd2293-4865-46d0-b717-f033a0824ea2"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["ReadByteArray"]], "paclet:ref/ReadByteArray"},
          "RefLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "8a60b0a6-db6b-4dcc-b572-dc28e231c8cd"]
       }], "SeeAlso",ExpressionUUID->"7c3b2e84-e974-43e0-ba48-5e91adeaa7b3"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"773676e8-1527-4406-9836-\
25a5dce92d00"],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedGuide.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"Related", " ", "Guides"}], "MoreAboutSection"]},
      {
       RowBox[{"\[FilledVerySmallSquare]", Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Steganography"]], 
           "paclet:WolframInstitute/Puzzles/guide/Steganography"},
          "RefLinkPlain",
          BaseStyle->{"MoreAbout"}]], "MoreAbout",ExpressionUUID->
         "abd935df-e20d-48ad-95c5-28150516195e"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"65b15d0b-d47c-4c8a-ab4f-\
af79b5eff780"],

Cell[" ", "FooterCell",ExpressionUUID->"6b214459-a4bd-49d6-b933-a2c8978e1ef5"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"ImageAppendedData",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "", "LinkTrails" -> "", 
  "ExampleCounter" -> 1, 
  "Openers" -> {
   "PrimaryExamplesSection" -> Open, "ExampleSection" -> {"0" -> Open}, 
    "AllOptsTable" -> Closed}, "NewStyles" -> True, 
  "CitationPopupData" -> $Failed, "ShowCitation" -> False, "HasOptions" -> 
  True, "RootCaptions" -> "", "HeaderCoreAreaLink" -> {}, 
  "Metadata" -> {
   "built" -> "{2026, 8, 27, 0, 11, 43.571801}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[ImageAppendedData, paclet : \
WolframInstitute/Puzzles/ref/ImageAppendedData, WolframInstitute/Puzzles \
Package Symbol][source] gives the bytes of an image file that follow the \
container's declared end, as a ByteArray.", "synonyms" -> {}, 
    "tabletags" -> {}, "title" -> "ImageAppendedData", "titlemodifier" -> "", 
    "metadescription" -> "", "windowtitle" -> "ImageAppendedData", "type" -> 
    "Symbol", "uri" -> "WolframInstitute/Puzzles/ref/ImageAppendedData", 
    "WorkflowDockedCell" -> ""}, "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"f228d404-83f3-4162-bb34-42ba64e1e964"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "TextAnnotation"->{
  Cell[15319, 413, 205, 5, 70, "ExampleText",ExpressionUUID->"0c129003-419e-4899-97a3-2d75dba7fe69",
   CellTags->"TextAnnotation"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"TextAnnotation", 45803, 1266}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[585, 21, 6378, 154, 70, "AnchorBarGrid",ExpressionUUID->"e9657d6f-5a89-4da4-8554-9889512340ec",
 CellID->1],
Cell[6966, 177, 107, 0, 70, "ContextNameCell",ExpressionUUID->"f855dad1-e329-4597-88ca-34edf4924fd8"],
Cell[CellGroupData[{
Cell[7098, 181, 560, 14, 70, "ObjectNameGrid",ExpressionUUID->"e3aadc41-fe57-46b1-874f-177ee0aeb7d2"],
Cell[7661, 197, 1077, 28, 70, "Usage",ExpressionUUID->"fee634bf-3052-46c9-abbe-cd5de861358f"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8775, 230, 1443, 34, 70, "NotesSection",ExpressionUUID->"c6c1423d-3b49-42b4-ada1-1d4cc0185c29",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->405999952],
Cell[10221, 266, 643, 21, 70, "Notes",ExpressionUUID->"8e60e463-7435-412e-a092-a459d911f5cd"],
Cell[10867, 289, 185, 3, 70, "Notes",ExpressionUUID->"4d4083d2-40ad-4a20-89fe-f81b8631d5e0"],
Cell[11055, 294, 411, 11, 70, "Notes",ExpressionUUID->"f6c5b5dc-a145-4748-96ca-83b2869f8962"],
Cell[11469, 307, 356, 5, 70, "Notes",ExpressionUUID->"cd1be1ee-2619-4e59-b74f-3f0836478eb5"],
Cell[11828, 314, 486, 12, 70, "Notes",ExpressionUUID->"0e8df280-d4b5-4c26-ae2a-56772ad32ff2"]
}, Closed]],
Cell[12329, 329, 80, 0, 70, "PageDelimiter",ExpressionUUID->"75e30972-713e-4672-a6d7-d0149e114a91"],
Cell[CellGroupData[{
Cell[12434, 333, 1402, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"bdff6ba8-b4d2-4c28-b157-469ef9240dbc",
 CellID->1085646745],
Cell[13839, 372, 216, 4, 70, "Input",ExpressionUUID->"ad2c0da8-c98c-4b31-b2bb-1a131f48eed1",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[14080, 380, 1236, 31, 70, "ExampleSection",ExpressionUUID->"2bda1db5-fb87-499b-9add-507252c44d01",
 CellID->1443778303],
Cell[15319, 413, 205, 5, 70, "ExampleText",ExpressionUUID->"0c129003-419e-4899-97a3-2d75dba7fe69",
 CellTags->"TextAnnotation"],
Cell[CellGroupData[{
Cell[15549, 422, 705, 18, 70, "Input",ExpressionUUID->"bb9a2b6e-41ad-43f6-a108-159c6476f78b"],
Cell[16257, 442, 107, 1, 70, "Output",ExpressionUUID->"d32c6ab5-d576-4173-b8ba-c30cd84d4d48"]
}, Open  ]],
Cell[CellGroupData[{
Cell[16401, 448, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"e615c1d4-5999-419f-8505-7b2d2c713bea"],
Cell[16628, 455, 157, 2, 70, "ExampleText",ExpressionUUID->"55ccf90f-c877-4175-a8ba-a25d6bf0b24f"],
Cell[CellGroupData[{
Cell[16810, 461, 1015, 26, 70, "Input",ExpressionUUID->"c23df5b2-c0e5-4bbf-a11a-6d14b112325f"],
Cell[17828, 489, 138, 1, 70, "Output",ExpressionUUID->"95eb46f8-eadf-4c81-a92a-37f0c5df3da0"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[18015, 496, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"37c22152-b8bf-47aa-b38e-c46e7f0fd259"],
Cell[18242, 503, 132, 0, 70, "ExampleText",ExpressionUUID->"55ec31dd-051a-472f-8eaf-8540d7de8963"],
Cell[CellGroupData[{
Cell[18399, 507, 1057, 26, 70, "Input",ExpressionUUID->"df63a862-3149-4de6-a69a-96bb211b9d67"],
Cell[19459, 535, 154, 3, 70, "Output",ExpressionUUID->"05366f19-d8e2-404e-b3b2-47f068377de2"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[19674, 545, 1227, 31, 70, "ExampleSection",ExpressionUUID->"7a52bd09-3424-4d91-af01-f7dc350e6f0c",
 CellID->1293636265],
Cell[20904, 578, 118, 0, 70, "ExampleText",ExpressionUUID->"19e6ab3c-be6d-4e66-98f3-269d82f59ab7"],
Cell[CellGroupData[{
Cell[21047, 582, 1023, 26, 70, "Input",ExpressionUUID->"d8cd89d2-b55b-42d8-8abe-7cb5956d221b"],
Cell[22073, 610, 143, 1, 70, "Output",ExpressionUUID->"521260ad-3ce7-426d-8904-2d0aafd83295"]
}, Open  ]],
Cell[CellGroupData[{
Cell[22253, 616, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"5f8e7739-ac81-4db1-8b70-92c7b24272f0"],
Cell[22480, 623, 110, 0, 70, "ExampleText",ExpressionUUID->"e5f78f18-2292-43d4-82c6-fdc75868af2a"],
Cell[CellGroupData[{
Cell[22615, 627, 1001, 25, 70, "Input",ExpressionUUID->"80ca4aed-d040-4afd-a383-a7209a582b91"],
Cell[23619, 654, 131, 1, 70, "Output",ExpressionUUID->"583af2c0-4b67-49a4-946e-75d2437702ef"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[23811, 662, 1233, 31, 70, "ExampleSection",ExpressionUUID->"0cbf10d7-8677-43bb-9b18-6e8b0af62454",
 CellID->258228157],
Cell[25047, 695, 539, 14, 70, "ExampleText",ExpressionUUID->"39dbfef1-0d19-4802-b89b-cbbd5cb231fd"],
Cell[CellGroupData[{
Cell[25611, 713, 1661, 42, 70, "Input",ExpressionUUID->"27c2a0f2-1142-4f1e-bfd8-604ded0a3865"],
Cell[27275, 757, 142, 2, 70, "Output",ExpressionUUID->"a02e2c2c-86ce-4234-bc9b-cb51a7fd7c66"]
}, Open  ]],
Cell[CellGroupData[{
Cell[27454, 764, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"aedc4897-8030-436c-81a1-5f88c85ad7ba"],
Cell[27681, 771, 154, 2, 70, "ExampleText",ExpressionUUID->"dfe4d437-d0aa-44fb-8ee1-155e782f29a4"],
Cell[CellGroupData[{
Cell[27860, 777, 1660, 42, 70, "Input",ExpressionUUID->"63a98201-9d71-4796-896e-644121c85649"],
Cell[29523, 821, 152, 3, 70, "Output",ExpressionUUID->"41b0ba06-2428-4144-bb31-949503948ba1"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[29736, 831, 1244, 31, 70, "ExampleSection",ExpressionUUID->"a41d2910-913f-4bea-9452-c579af601b8a",
 CellID->2123667759],
Cell[30983, 864, 148, 2, 70, "ExampleText",ExpressionUUID->"37c296d4-2de6-4ae8-b642-86a2dbc23171"],
Cell[CellGroupData[{
Cell[31156, 870, 2167, 58, 70, "Input",ExpressionUUID->"5131c04d-db94-41d6-9f0f-eacaf6bd04b8"],
Cell[33326, 930, 110, 1, 70, "Output",ExpressionUUID->"b5a5aa1a-bed0-4775-abab-988174af0108"]
}, Open  ]],
Cell[CellGroupData[{
Cell[33473, 936, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"9f20167d-db52-47ab-be59-313783f72a27"],
Cell[33700, 943, 585, 14, 70, "ExampleText",ExpressionUUID->"4e311eac-5168-411e-8368-77df7a16aa43"],
Cell[CellGroupData[{
Cell[34310, 961, 1371, 33, 70, "Input",ExpressionUUID->"b193122f-d66d-49da-a706-add55b5e1bfd"],
Cell[35684, 996, 122, 1, 70, "Output",ExpressionUUID->"9d43980e-6211-4794-a892-8e0a280addda"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[35867, 1004, 1237, 31, 70, "ExampleSection",ExpressionUUID->"e3f84584-efdf-428d-9e8c-fa24c6d0b1de",
 CellID->1305812373],
Cell[37107, 1037, 327, 5, 70, "ExampleText",ExpressionUUID->"d0c5e373-1218-4892-b7ac-c7518a33fa07"],
Cell[CellGroupData[{
Cell[37459, 1046, 1212, 30, 70, "Input",ExpressionUUID->"9984033f-53d6-49c2-9030-66b97244727a"],
Cell[38674, 1078, 224, 2, 70, "Output",ExpressionUUID->"b81fa361-3fc6-4162-88d8-66f631fbc962"]
}, Open  ]],
Cell[CellGroupData[{
Cell[38935, 1085, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"b6d06bcc-3f5c-47b9-9730-4c8fb68774f7"],
Cell[39162, 1092, 403, 11, 70, "ExampleText",ExpressionUUID->"c4b9b4fe-49e5-4c49-a887-cf5fe707a727"],
Cell[CellGroupData[{
Cell[39590, 1107, 339, 7, 70, "Input",ExpressionUUID->"42656cf0-c8dd-4599-8a8a-40796cf36f93"],
Cell[39932, 1116, 110, 1, 70, "Output",ExpressionUUID->"3b6e1991-316b-49fc-8106-be424a0cfbc9"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[40093, 1123, 3074, 80, 70, "SeeAlsoSection",ExpressionUUID->"773676e8-1527-4406-9836-25a5dce92d00"],
Cell[43170, 1205, 706, 19, 70, "MoreAboutSection",ExpressionUUID->"65b15d0b-d47c-4c8a-ab4f-af79b5eff780"],
Cell[43879, 1226, 78, 0, 70, "FooterCell",ExpressionUUID->"6b214459-a4bd-49d6-b933-a2c8978e1ef5"]
}
]
*)

(* End of internal cache information *)

