πŸ“¦ timheuer / zipview

πŸ“„ README.md Β· 77 lines
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# πŸ“¦ Zip Viewer

> Peek inside zip files without ever extracting them!

**Zip Viewer** brings seamless zip file browsing directly into VS Code's Explorer. Browse, preview, and inspect archived files as if they were part of your workspaceβ€”no extraction required.

[![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/timheuer.vscode-zip-viewer?label=VS%20Code%20Marketplace&logo=visualstudiocode)](https://marketplace.visualstudio.com/items?itemName=timheuer.vscode-zip-viewer)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/timheuer.vscode-zip-viewer?logo=visualstudiocode)](https://marketplace.visualstudio.com/items?itemName=timheuer.vscode-zip-viewer)
![License](https://img.shields.io/badge/license-MIT-green)

## πŸ“₯ Installation

[![Install in VS Code](https://img.shields.io/badge/Install%20in-VS%20Code-blue?logo=visualstudiocode)](vscode:extension/timheuer.vscode-zip-viewer)
[![Install in VS Code Insiders](https://img.shields.io/badge/Install%20in-VS%20Code%20Insiders-green?logo=visualstudiocode)](vscode-insiders:extension/timheuer.vscode-zip-viewer)

Or search for **"Zip Viewer"** in the VS Code Extensions view (`Ctrl+Shift+X`).

## ✨ Features

| Feature | Description |
|---------|-------------|
| πŸ—‚οΈ **Explorer Integration** | Zip files appear in a dedicated "Zip Files" panel in your Explorer sidebar |
| πŸ” **Browse Without Extracting** | Expand archives to navigate their full directory structure |
| πŸ“„ **Syntax-Highlighted Preview** | Open any text file with full language supportβ€”JS, TS, JSON, CSS, Markdown, and more |
| πŸ–ΌοΈ **Image Preview** | View PNG, JPG, GIF, WebP, SVG, and other images using VS Code's native viewer |
| 🎨 **Theme-Aware Icons** | Files and folders display icons from your current file icon theme |
| ⚑ **Live Updates** | Tree automatically refreshes when zip files are added, removed, or changed |
| πŸ“ **Quick Navigation** | Right-click any zip to reveal it in the workspace Explorer |

## πŸš€ Getting Started

1. **Install** the extension from the VS Code Marketplace
2. **Open** a workspace containing `.zip` files
3. **Find** the "Zip Files" panel in your Explorer sidebar
4. **Click** any zip file to expand and browse its contents
5. **Select** a file to preview it instantly

## πŸ“ Supported File Types

### Text Files
All text-based files open with proper syntax highlighting based on their extensionβ€”`.js`, `.ts`, `.py`, `.css`, `.json`, `.xml`, `.md`, `.html`, `.yaml`, and hundreds more.

### Images
Images open in VS Code's built-in image viewer with full zoom and pan support:
- PNG, JPG, JPEG, GIF, BMP, ICO, WebP, SVG

### Binary Files
Other binary files (executables, PDFs, archives) are listed in the tree but cannot be previewed.

## βš™οΈ Configuration

Fine-tune the extension's behavior in your VS Code settings:

| Setting | Default | Description |
|---------|---------|-------------|
| `zipView.maxFileSize` | `10` | Max file size (MB) that can be previewed |
| `zipView.maxCompressionRatio` | `100` | Max compression ratio before blocking (zip bomb protection) |
| `zipView.maxCacheSize` | `50` | Number of file contents to cache for faster access |
| `zipView.logLevel` | `info` | Logging verbosity: `off`, `error`, `warn`, `info`, `debug`, `trace` |

> πŸ’‘ **Tip**: Defaults are optimized for security and performance. Increase with caution.

## πŸ”’ Security

Zip Viewer includes built-in protections:
- **Path traversal prevention** β€” Blocks malicious paths like `../../../etc/passwd`
- **Zip bomb detection** β€” Refuses to open files with suspicious compression ratios
- **File size limits** β€” Prevents memory exhaustion from oversized files

## πŸ“‹ Requirements

- Visual Studio Code **1.107.0** or higher

## πŸ“„ License

[MIT](LICENSE.md) β€” Made with β˜• by [Tim Heuer](https://timheuer.com)