32 formats de fichiers, chacun généré à une taille exacte
Chacun est un vrai fichier de ce format. Il s'ouvre dans le logiciel qui lui correspond et fait exactement le nombre d'octets que vous avez demandé. Aucun n'est du remplissage de zéros avec une extension collée dessus.
| Format | Nom | Extension | Plus petit fichier | Fidélité | Vérifié avec |
|---|---|---|---|---|---|
avif |
AV1 Image File Format | .avif |
311 | full | pillow |
bmp |
Windows Bitmap | .bmp |
58 | full | pillow |
csv |
Comma-Separated Values | .csv |
115 | full | python-csv |
docx |
Word (Office Open XML) | .docx |
1220 | full | libreoffice |
eml |
Email message | .eml |
289 | full | python-email |
geojson |
GeoJSON | .geojson |
875 | full | gdal-geojson |
gif |
Graphics Interchange Format | .gif |
114 | full | pillow |
html |
HyperText Markup Language | .html |
122 | full | python-html |
ico |
Windows Icon | .ico |
70 | full | pillow |
jpg |
JPEG | .jpg |
602 | full | pillow |
json |
JavaScript Object Notation | .json |
219 | full | node-json |
jxl |
JPEG XL | .jxl |
147 | full | pillow-jxl |
log |
Server and application log | .log |
155 | full | sans objet |
md |
Markdown | .md |
0 | full | sans objet |
mp4 |
MP4 video | .mp4 |
3312 | full | libaom |
otlp |
OpenTelemetry Protocol JSON | .jsonl .json |
1266 | full | otelcol |
pdf |
Portable Document Format | .pdf |
3415 | full | pdftotext |
png |
Portable Network Graphics | .png |
74 | full | pillow |
pptx |
PowerPoint (Office Open XML) | .pptx |
4809 | full | libreoffice |
rtf |
Rich Text Format | .rtf |
65 | full | pandoc-rtf |
svg |
Scalable Vector Graphics | .svg |
194 | full | inkscape |
targz |
tar + gzip | .tar.gz |
9790 | full | 7z |
tiff |
Tagged Image File Format | .tiff |
183 | full | pillow |
toml |
TOML | .toml |
212 | full | python-toml |
txt |
Plain text | .txt |
0 | full | sans objet |
wav |
Waveform Audio | .wav |
98 | full | ffprobe |
webm |
WebM video | .webm |
3284 | full | libaom |
webp |
WebP | .webp |
148 | full | pillow |
xlsx |
Excel (Office Open XML) | .xlsx |
1726 | full | libreoffice |
xml |
Extensible Markup Language | .xml |
264 | full | python-xml |
yaml |
YAML | .yaml |
241 | full | python-yaml |
zip |
ZIP | .zip |
8382 | full | 7z |
Ce que signifient les colonnes
-
Plus petit fichier
Le moins d'octets que cet outil accepte pour ce format, y compris l'étiquette qu'il écrit dans le fichier. Demandez moins et vous obtenez une erreur qui nomme le plancher et sa raison, jamais un fichier de mauvaise taille.
-
Fidélité
À quel point le fichier est complet.
fullsignifie qu'un lecteur qui analyse vraiment le format l'accepte, et pas seulement que l'extension correspond. -
Vérifié avec
Le lecteur indépendant qui ouvre chaque fichier généré avant la livraison du format - une implémentation distincte, pas notre propre code qui corrige ses propres devoirs.
Chaque format se répète aussi à l'octet près : la même recette et la même graine produisent des fichiers identiques sur n'importe quelle machine, ce qui rend une recette sûre à commiter à la place des fixtures elles-mêmes.
Réglages que chaque format accepte
La plupart des formats ont des réglages propres - dimensions d'image, qualité JPEG, nombre de pages
PDF, lignes et colonnes d'un tableur, nombre d'entrées dans une archive. Définissez-les avec
--set key=value en ligne de commande, ou sous properties: dans une
recette.
tfg generate --format jpg --size 500kb --set width=1920 --set height=1080 --set quality=85
| Format | Réglage | Accepte |
|---|---|---|
avif |
width |
1 - 16384 pixels |
height |
1 - 16384 pixels | |
quality |
1 - 100 | |
bmp |
width |
1 - 20000 pixels |
height |
1 - 20000 pixels | |
csv |
delimiter |
comma, pipe, semicolon, tab |
line_ending |
crlf, lf | |
header |
vrai ou faux | |
quote_style |
all, minimal, none | |
columns |
2 - 32768 colonnes | |
docx |
paragraphs |
1 - 50000 paragraphes |
eml |
body |
alternative, html, plain |
layout |
newsletter, simple | |
text_encoding |
7bit, 8bit, base64, quoted-printable | |
charset |
iso-8859-2, utf-8, windows-1250 | |
headers |
ascii, encoded, utf8 | |
recipients |
1 - 100000 | |
line_endings |
crlf, lf | |
attachments |
0 - 10000 | |
attachment_format |
l'identifiant d'un format, comme le liste tfg formats | |
attachment_size |
une taille comme 2mb | |
filename_style |
both, content-type, none, rfc2047, rfc2231 | |
message_depth |
1 - 2000 | |
inline |
0 - 10000 | |
inline_format |
l'identifiant d'un format d'image, comme le liste tfg formats | |
inline_size |
une taille comme 2mb | |
geojson |
geometry |
geometrycollection, linestring, mixed, multilinestring, multipoint, multipolygon, point, polygon |
formatting |
indented, minified, record-per-line | |
precision |
0 - 15 décimales | |
altitude |
vrai ou faux | |
vertices |
3 - 1000000 points | |
holes |
0 - 100000 trous | |
winding |
reversed, rfc7946 | |
antimeridian |
vrai ou faux | |
unlocated |
all, none, some | |
ids |
mixed, none, number, string | |
bbox |
vrai ou faux | |
gif |
width |
1 - 20000 pixels |
height |
1 - 20000 pixels | |
frames |
1 - 60 | |
html |
structure |
document, fragment |
nesting |
0 - 100000 | |
characters |
ascii, international | |
elements |
basic, every | |
links |
0 - 1000000 | |
bom |
vrai ou faux | |
formatting |
indented, lines, minified | |
styles |
embedded, inline, none | |
inline |
0 - 10000 | |
inline_format |
l'identifiant d'un format d'image, comme le liste tfg formats | |
inline_size |
une taille comme 2mb | |
ico |
width |
1 - 256 pixels |
height |
1 - 256 pixels | |
embed |
bmp, png | |
jpg |
width |
1 - 20000 pixels |
height |
1 - 20000 pixels | |
quality |
1 - 100 | |
json |
formatting |
indented, minified, record-per-line |
jxl |
width |
1 - 16384 pixels |
height |
1 - 16384 pixels | |
quality |
1 - 100 | |
log |
entry_format |
apache-combined, apache-common, json-lines, nginx, plain, syslog |
timestamps |
advancing, fixed | |
rate |
1 - 1000000 entrées par seconde | |
methods |
get, mixed, read | |
status_mix |
client-errors, realistic, server-errors, success | |
level_mix |
debug, errors, quiet, realistic | |
ip_version |
mixed, v4, v6 | |
line_ending |
crlf, lf | |
md |
encoding |
utf-16be, utf-16le, utf-8 |
bom |
vrai ou faux | |
mp4 |
width |
1 - 16384 pixels |
height |
1 - 16384 pixels | |
duration |
une durée comme 10s | |
change_interval |
une durée comme 10s | |
frame_rate |
1, 5, 10, 12, 15, 24, 25, 30, 48, 50, 60 | |
keyframe_interval |
une durée comme 10s | |
quality |
1 - 100 | |
otlp |
signal |
logs, metrics, traces |
formatting |
indented, minified, record-per-line | |
bom |
vrai ou faux | |
batch |
1 - 1000 | |
start |
un instant en UTC comme 2026-08-01T12:00:00Z | |
rate |
1 - 1000000 entrées par seconde | |
depth |
1 - 100 | |
status_mix |
client-errors, realistic, server-errors, success | |
level_mix |
debug, errors, quiet, realistic | |
trace_context |
vrai ou faux | |
metric_kind |
exponential-histogram, gauge, histogram, mixed, sum, summary | |
temporality |
cumulative, delta | |
exemplars |
vrai ou faux | |
interval |
1 - 86400 secondes | |
id_encoding |
base64, hex, upper-hex | |
enum_encoding |
name, number | |
key_case |
camel, snake | |
large_numbers |
number, text | |
time_order |
in-order, out-of-order | |
end_before_start |
vrai ou faux | |
empty_envelope |
vrai ou faux | |
body |
any-value, text | |
non_finite |
vrai ou faux | |
pdf |
pages |
1 - 5000 |
page_size |
a3, a4, a5, legal, letter, mixed | |
orientation |
landscape, mixed, portrait | |
rotate |
0, 90, 180, 270 | |
pdf_version |
1.4, 1.7 | |
title |
n'importe quel texte | |
author |
n'importe quel texte | |
subject |
n'importe quel texte | |
keywords |
n'importe quel texte | |
creator |
n'importe quel texte | |
producer |
n'importe quel texte | |
created |
une date comme 2024-02-29 ou 2024-02-29T13:45:00+02:00, ou none | |
modified |
une date comme 2024-02-29 ou 2024-02-29T13:45:00+02:00, ou none | |
png |
width |
1 - 20000 pixels |
height |
1 - 20000 pixels | |
pptx |
slides |
1 - 500 diapositives |
rtf |
characters |
ascii, international |
text_encoding |
both, codepage, literal, unicode | |
elements |
basic, every | |
nesting |
0 - 10000000 | |
links |
0 - 1000000 | |
inline |
0 - 10000 | |
inline_format |
l'identifiant d'un format d'image, comme le liste tfg formats | |
inline_size |
une taille comme 2mb | |
picture_data |
binary, hex | |
svg |
width |
1 - 20000 pixels |
height |
1 - 20000 pixels | |
targz |
entries |
0 - 10000 |
entry_format |
l'identifiant d'un format, comme le liste tfg formats | |
entry_size |
une taille comme 2mb | |
compression |
best, default, fast, none | |
depth |
0 - 50 | |
directory_entries |
vrai ou faux | |
entry_mode |
000, 400, 444, 600, 644, 664, 666, 700, 755, 777 | |
entry_owner |
root, unset, user | |
tiff |
width |
1 - 20000 pixels |
height |
1 - 20000 pixels | |
txt |
encoding |
utf-16be, utf-16le, utf-8 |
bom |
vrai ou faux | |
wav |
sample_rate |
8000 - 192000 hertz |
bit_depth |
8, 16, 24, 32 | |
channels |
1 - 8 | |
content |
noise, silence, sweep, tone | |
webm |
width |
1 - 16384 pixels |
height |
1 - 16384 pixels | |
duration |
une durée comme 10s | |
change_interval |
une durée comme 10s | |
frame_rate |
1, 5, 10, 12, 15, 24, 25, 30, 48, 50, 60 | |
keyframe_interval |
une durée comme 10s | |
quality |
1 - 100 | |
webp |
width |
1 - 16383 pixels |
height |
1 - 16383 pixels | |
xlsx |
rows |
1 - 200000 lignes |
columns |
1 - 32768 colonnes | |
xml |
encoding |
utf-16be, utf-16le, utf-8 |
bom |
vrai ou faux | |
zip |
entries |
0 - 10000 |
entry_format |
l'identifiant d'un format, comme le liste tfg formats | |
entry_size |
une taille comme 2mb | |
compression |
best, default, fast, none | |
depth |
0 - 50 | |
directory_entries |
vrai ou faux | |
password |
le mot de passe, en clair | |
encryption |
aes-128, aes-192, aes-256, none, zipcrypto |
Une valeur hors de ce qu'un réglage accepte est refusée avec un message qui nomme le réglage, la plage autorisée et quoi utiliser à la place. Un réglage inconnu est aussi une erreur, jamais une valeur par défaut silencieuse - une faute de frappe acceptée en silence donne un fichier aux mauvais réglages et une heure à se demander pourquoi le test passe alors qu'il ne devrait pas.
Lancez tfg formats <id> pour voir exactement ce qu'un format accepte dans la
version que vous avez.
Les archives contiennent de vrais fichiers
eml et targz et zip
peuvent être remplis d'entrées plutôt que laissés en coquille vide. Une archive générée contient
réellement les documents qu'elle prétend contenir, si bien que tout ce qui la décompresse
pendant un test y trouve de vrais fichiers.
targets:
- id: bundle
format: zip
contains:
- format: txt
count: 200
size: 4kb