---
title: "Unwrap nested encoding"
description: "Ask Magic to rank plausible decoding paths through several hidden layers."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.serialize.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Unwrap nested encoding

import RecipeInstallButton from "../../../components/RecipeInstallButton.astro";

## What it can do

- Explore likely decoders to a bounded depth
- Score and rank plausible transformations
- Return a reproducible candidate operation chain
- Reveal the final result without hiding how it was reached

## Recipe

```text
Magic(depth: 3)
```

Magic is a triage tool, not proof. Review the proposed chain, recreate the strongest candidate as explicit operations, and validate every intermediate result.

> **Turn discovery into procedure**
>
> Once Magic finds `From Base58 → Zlib Inflate → From Hex`, replace Magic with those exact operations. The resulting recipe is faster, deterministic, and easier to audit.

Source: https://help.serialize.dev/recipes/unwrap-nested-encoding/index.mdx
