# run_benchmark_v2.ps1 # OneCharacterCode Real-World Benchmark - V2 Optimized Prototype Encoder # PowerShell 5.1 compatible. ASCII-only body. Does NOT use $host as a variable. # # Honest disclosure (also printed on the public page): # This is a prototype symbolic dictionary encoder. It is NOT the final # patented OneCharacterCode engine. It improves on V1 by: # - 1-byte tokens for the top 8 highest-savings entries (Tier 1) # - 2-byte tokens for the next 256 entries (Tier 2) # - Net-gain threshold per entry (skip entries that cost more than they save) # - Greedy savings-ranked acceptance with overlap rejection # - Tries phrase lengths {3,4,5,6,8,10,12,16,24,32} in one pass # - Reports gzip(raw) AND gzip(occ_v2) so the reader can see whether OCC # made gzip's job easier or harder # Round-trip SHA-256 must PASS or the compression number is discarded. [CmdletBinding()] param( [string]$Root = $PSScriptRoot ) $ErrorActionPreference = 'Stop' Set-StrictMode -Version 2 $InputDir = Join-Path $Root 'inputs' $OutputDir = Join-Path $Root 'outputs' if (-not (Test-Path $OutputDir)) { New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null } # ---- Helpers ---- function Get-Sha256ForBytes { param([byte[]]$Bytes) $sha = [System.Security.Cryptography.SHA256]::Create() try { $h = $sha.ComputeHash($Bytes) return ([BitConverter]::ToString($h)).Replace('-','').ToLower() } finally { $sha.Dispose() } } function Get-GzipBytes { param([byte[]]$Bytes) $out = New-Object System.IO.MemoryStream $gz = New-Object System.IO.Compression.GZipStream($out,[System.IO.Compression.CompressionMode]::Compress) $gz.Write($Bytes,0,$Bytes.Length) $gz.Close() return $out.ToArray() } function Count-NonOverlapping { param([string]$Text, [string]$Pattern) if ([string]::IsNullOrEmpty($Pattern)) { return 0 } $cnt = 0 $i = 0 $plen = $Pattern.Length while ($i -le $Text.Length - $plen) { $j = $Text.IndexOf($Pattern, $i) if ($j -lt 0) { break } $cnt++ $i = $j + $plen } return $cnt } # ---- V1 encoder (snapshot copy, for side-by-side comparison only) ---- # Single PUA token per entry; no tier; simple. Same algorithm as V1. $script:V1_MAGIC = [byte[]](0x4F,0x43,0x43,0x31) function Invoke-OccV1Encode { param([byte[]]$InputBytes) $utf8 = New-Object System.Text.UTF8Encoding $false $text = $utf8.GetString($InputBytes) $cands = @{} foreach ($len in @(64,48,32,24,16,12,8,6,5)) { if ($text.Length -lt $len) { continue } for ($i = 0; $i -le $text.Length - $len; $i++) { $sub = $text.Substring($i, $len) if ($cands.ContainsKey($sub)) { $cands[$sub] = $cands[$sub] + 1 } else { $cands[$sub] = 1 } } } $scored = New-Object System.Collections.Generic.List[object] foreach ($k in $cands.Keys) { $c = $cands[$k] if ($c -lt 2) { continue } $bl = $utf8.GetByteCount($k) if ($bl -lt 5) { continue } $sv = ($bl - 3) * ($c - 1) - 2 - $bl if ($sv -gt 0) { $scored.Add([pscustomobject]@{Text=$k;Count=$c;ByteLen=$bl;Savings=$sv}) | Out-Null } } $ranked = $scored | Sort-Object Savings -Descending $accepted = New-Object System.Collections.Generic.List[object] foreach ($e in $ranked) { $skip = $false foreach ($a in $accepted) { if ($a.Text.Contains($e.Text)) { $skip = $true; break } } if (-not $skip) { $accepted.Add($e) | Out-Null } if ($accepted.Count -ge 1024) { break } } $encoded = $text for ($i = 0; $i -lt $accepted.Count; $i++) { $pua = [char](0xE000 + $i) $encoded = $encoded.Replace($accepted[$i].Text, [string]$pua) } $bodyBytes = $utf8.GetBytes($encoded) $ms = New-Object System.IO.MemoryStream $bw = New-Object System.IO.BinaryWriter($ms) $bw.Write($script:V1_MAGIC) $bw.Write([byte]0x01) $bw.Write([int32]$accepted.Count) foreach ($e in $accepted) { $eb = $utf8.GetBytes($e.Text) $bw.Write([uint16]$eb.Length) $bw.Write($eb) } $bw.Write([int32]$bodyBytes.Length) $bw.Write($bodyBytes) $bw.Close() return ,$ms.ToArray() } # ---- V2 encoder (the optimized prototype) ---- # # Disk format: # MAGIC : 4 bytes "OCC2" # VERSION : 1 byte 0x02 # TIER1_COUNT : 1 byte # TIER2_COUNT : 2 bytes uint16 little-endian # Tier1 entries (count = TIER1_COUNT): # LEN: 1 byte (uint8) # BODY: LEN bytes (UTF-8) # Tier2 entries (count = TIER2_COUNT): # LEN: 2 bytes uint16 little-endian # BODY: LEN bytes (UTF-8) # BODY_LEN : 4 bytes int32 little-endian # BODY : BODY_LEN bytes # # Body byte semantics on decode: # 0x01..0x08 : Tier1 token, lookup dict[byte - 1] # 0x0E + idx : Tier2 token, lookup dict[8 + idx] # 0x0F + b : Literal byte b (escape used so source can include reserved bytes) # other byte : Literal byte (passes through; includes UTF-8 multi-byte continuation) # # Reserved bytes that must be escaped if they appear literally in source: # 0x01..0x08, 0x0E, 0x0F # # For typical text inputs (HTML, JSON, English text) these never appear, # so escape cost is effectively zero. $script:V2_MAGIC = [byte[]](0x4F,0x43,0x43,0x32) function Test-NoReservedBytes { param([byte[]]$Bytes) foreach ($b in $Bytes) { if ($b -le 0x08 -and $b -ne 0x00) { return $false } if ($b -eq 0x0E -or $b -eq 0x0F) { return $false } } return $true } function Invoke-OccV2Encode { param([byte[]]$InputBytes) $utf8 = New-Object System.Text.UTF8Encoding $false $text = $utf8.GetString($InputBytes) # Phase 1 - Build candidate counts at all target lengths. $lengths = @(32,24,16,12,10,8,6,5,4,3) $cands = @{} foreach ($len in $lengths) { if ($text.Length -lt $len) { continue } $endIdx = $text.Length - $len for ($i = 0; $i -le $endIdx; $i++) { $sub = $text.Substring($i, $len) # Skip if any UTF-8 byte of the substring is a reserved token byte $bs = $utf8.GetBytes($sub) $bad = $false foreach ($b in $bs) { if (($b -le 0x08 -and $b -ne 0x00 -and $b -ne 0x09) -or $b -eq 0x0E -or $b -eq 0x0F) { # 0x09 = TAB is fine; 0x0A/0x0D are above 0x08 already $bad = $true; break } } if ($bad) { continue } if ($cands.ContainsKey($sub)) { $cands[$sub] = $cands[$sub] + 1 } else { $cands[$sub] = 1 } } } # Phase 2 - Score with best-case (Tier1) net savings $candList = New-Object System.Collections.Generic.List[object] foreach ($k in $cands.Keys) { $c = $cands[$k] if ($c -lt 2) { continue } $bl = $utf8.GetByteCount($k) # Tier1 net savings (single-byte token, 1-byte length prefix) # net = (bl - 1) * c - (1 + bl) $svT1 = ($bl - 1) * $c - (1 + $bl) # Tier2 net savings (2-byte token, 2-byte length prefix) $svT2 = ($bl - 2) * $c - (2 + $bl) if ($svT1 -le 0 -and $svT2 -le 0) { continue } $candList.Add([pscustomobject]@{ Text=$k; OverlapCount=$c; ByteLen=$bl; SavingsT1=$svT1; SavingsT2=$svT2 }) | Out-Null } # Sort candidates by best-case savings (Tier1) $ranked = $candList | Sort-Object SavingsT1 -Descending # Phase 3 - Greedy accept with overlap rejection and recount in working text $accepted = New-Object System.Collections.Generic.List[object] $tier1Cap = 8 $tier2Cap = 256 $maxTotal = $tier1Cap + $tier2Cap $workingText = $text foreach ($c in $ranked) { if ($accepted.Count -ge $maxTotal) { break } # Overlap reject: skip if this substring is contained in OR contains any accepted entry $skip = $false foreach ($a in $accepted) { if ($a.Text.Contains($c.Text) -or $c.Text.Contains($a.Text)) { $skip = $true; break } } if ($skip) { continue } # Recount in current working text (which has earlier placeholders) $cnt = Count-NonOverlapping -Text $workingText -Pattern $c.Text if ($cnt -lt 2) { continue } # Decide tier based on slot availability $useT1 = $accepted.Count -lt $tier1Cap $tokenCost = if ($useT1) { 1 } else { 2 } $dictCost = $tokenCost + $c.ByteLen $netSavings = ($c.ByteLen - $tokenCost) * $cnt - $dictCost if ($netSavings -le 0) { continue } $idx = $accepted.Count $tier = if ($useT1) { 1 } else { 2 } $entry = [pscustomobject]@{ Text=$c.Text; ByteLen=$c.ByteLen; ActualCount=$cnt; Tier=$tier; Index=$idx; NetSavings=$netSavings } $accepted.Add($entry) | Out-Null # Replace in working text with a unique PUA placeholder so subsequent # candidate matches do not double-cover the same source span $placeholder = [char](0xE000 + $idx) $workingText = $workingText.Replace($c.Text, [string]$placeholder) } # Phase 4 - Emit encoded body # Walk $workingText char-by-char; emit either a placeholder's actual tier # token bytes, an escape sequence for a reserved source byte, or the # literal UTF-8 bytes of the char. $bodyMs = New-Object System.IO.MemoryStream for ($i = 0; $i -lt $workingText.Length; $i++) { $code = [int]$workingText[$i] if ($code -ge 0xE000 -and $code -lt (0xE000 + $accepted.Count)) { $e = $accepted[$code - 0xE000] if ($e.Tier -eq 1) { $bodyMs.WriteByte([byte]($e.Index + 1)) } else { $bodyMs.WriteByte(0x0E) $bodyMs.WriteByte([byte]($e.Index - $tier1Cap)) } } elseif ($code -lt 0x80) { # Pure ASCII $b = [byte]$code if (($b -le 0x08 -and $b -ne 0x00 -and $b -ne 0x09) -or $b -eq 0x0E -or $b -eq 0x0F) { $bodyMs.WriteByte(0x0F) # escape $bodyMs.WriteByte($b) } else { $bodyMs.WriteByte($b) } } else { # Non-ASCII char - emit its UTF-8 bytes $s = New-Object string @([char]$code, 1) # Surrogate pair handling if ([char]::IsHighSurrogate([char]$code) -and ($i + 1) -lt $workingText.Length -and [char]::IsLowSurrogate($workingText[$i+1])) { $s = $workingText.Substring($i, 2) $i++ } else { $s = [string][char]$code } $bs = $utf8.GetBytes($s) $bodyMs.Write($bs, 0, $bs.Length) } } $bodyBytes = $bodyMs.ToArray() # Phase 5 - Serialize $tier1Entries = New-Object System.Collections.Generic.List[object] $tier2Entries = New-Object System.Collections.Generic.List[object] foreach ($e in $accepted) { if ($e.Tier -eq 1) { $tier1Entries.Add($e) | Out-Null } else { $tier2Entries.Add($e) | Out-Null } } $ms = New-Object System.IO.MemoryStream $bw = New-Object System.IO.BinaryWriter($ms) $bw.Write($script:V2_MAGIC) $bw.Write([byte]0x02) $bw.Write([byte]$tier1Entries.Count) $bw.Write([uint16]$tier2Entries.Count) foreach ($e in $tier1Entries) { $eb = $utf8.GetBytes($e.Text) $bw.Write([byte]$eb.Length) $bw.Write($eb) } foreach ($e in $tier2Entries) { $eb = $utf8.GetBytes($e.Text) $bw.Write([uint16]$eb.Length) $bw.Write($eb) } $bw.Write([int32]$bodyBytes.Length) $bw.Write($bodyBytes) $bw.Close() return ,$ms.ToArray() } function Invoke-OccV2Decode { param([byte[]]$Encoded) $utf8 = New-Object System.Text.UTF8Encoding $false $ms = New-Object System.IO.MemoryStream(,$Encoded) $br = New-Object System.IO.BinaryReader($ms) $magic = $br.ReadBytes(4) # (no verify; if wrong, downstream PASS/FAIL will catch it) $version = $br.ReadByte() $t1count = $br.ReadByte() $t2count = $br.ReadUInt16() $dict = New-Object System.Collections.Generic.List[string] for ($i = 0; $i -lt $t1count; $i++) { $len = $br.ReadByte() $bs = $br.ReadBytes($len) $dict.Add($utf8.GetString($bs)) | Out-Null } for ($i = 0; $i -lt $t2count; $i++) { $len = $br.ReadUInt16() $bs = $br.ReadBytes($len) $dict.Add($utf8.GetString($bs)) | Out-Null } $bodyLen = $br.ReadInt32() $body = $br.ReadBytes($bodyLen) $br.Close() # Walk body and emit output bytes $out = New-Object System.IO.MemoryStream $j = 0 while ($j -lt $body.Length) { $b = $body[$j] if ($b -ge 0x01 -and $b -le 0x08) { $entryIdx = $b - 1 if ($entryIdx -lt $t1count) { $entryBytes = $utf8.GetBytes($dict[$entryIdx]) $out.Write($entryBytes, 0, $entryBytes.Length) } else { # Shouldn't happen for valid input $out.WriteByte($b) } $j++ } elseif ($b -eq 0x0E) { $idx = $body[$j+1] $dictIdx = $t1count + $idx $entryBytes = $utf8.GetBytes($dict[$dictIdx]) $out.Write($entryBytes, 0, $entryBytes.Length) $j += 2 } elseif ($b -eq 0x0F) { $out.WriteByte($body[$j+1]) $j += 2 } else { $out.WriteByte($b) $j++ } } return $out.ToArray() } # ---- Per-file benchmark ---- function Invoke-FileBenchmarkV2 { param([string]$InputFile, [string]$OutputDir) $name = [System.IO.Path]::GetFileName($InputFile) Write-Host "TEST: $name" $raw = [System.IO.File]::ReadAllBytes($InputFile) $rawLen = $raw.Length $rawSha = Get-Sha256ForBytes -Bytes $raw $gz = Get-GzipBytes -Bytes $raw $gzLen = $gz.Length $gzPath = Join-Path $OutputDir ($name + '.gz') [System.IO.File]::WriteAllBytes($gzPath, $gz) # V1 encoding (for side-by-side comparison) $v1 = Invoke-OccV1Encode -InputBytes $raw $v1Len = $v1.Length $v1Path = Join-Path $OutputDir ($name + '.occ1') [System.IO.File]::WriteAllBytes($v1Path, $v1) # V2 encoding $v2 = Invoke-OccV2Encode -InputBytes $raw $v2Len = $v2.Length $v2Path = Join-Path $OutputDir ($name + '.occ2') [System.IO.File]::WriteAllBytes($v2Path, $v2) # V2 round-trip $v2Decoded = Invoke-OccV2Decode -Encoded $v2 $v2Sha = Get-Sha256ForBytes -Bytes $v2Decoded $v2ReconPath = Join-Path $OutputDir ($name + '.occ2.reconstructed') [System.IO.File]::WriteAllBytes($v2ReconPath, $v2Decoded) $reconStatus = if ($rawSha -eq $v2Sha) { 'PASS' } else { 'FAIL' } # gzip(OCC V2) $gzOcc2 = Get-GzipBytes -Bytes $v2 $gzOcc2Len = $gzOcc2.Length $gzOcc2Path = Join-Path $OutputDir ($name + '.occ2.gz') [System.IO.File]::WriteAllBytes($gzOcc2Path, $gzOcc2) $gzPct = if ($rawLen -gt 0) { [math]::Round((1 - ($gzLen / $rawLen)) * 100, 2) } else { 0 } $v1Pct = if ($rawLen -gt 0) { [math]::Round((1 - ($v1Len / $rawLen)) * 100, 2) } else { 0 } $v2Pct = if ($rawLen -gt 0) { [math]::Round((1 - ($v2Len / $rawLen)) * 100, 2) } else { 0 } $gzOcc2Pct = if ($rawLen -gt 0) { [math]::Round((1 - ($gzOcc2Len / $rawLen)) * 100, 2) } else { 0 } $v1VsV2 = if ($v1Len -gt 0) { [math]::Round((1 - ($v2Len / $v1Len )) * 100, 2) } else { 0 } Write-Host (" raw : " + ('{0:N0}' -f $rawLen) + " bytes") Write-Host (" gzip(raw) : " + ('{0:N0}' -f $gzLen) + " bytes (" + $gzPct + "%)") Write-Host (" occ V1 : " + ('{0:N0}' -f $v1Len) + " bytes (" + $v1Pct + "%)") Write-Host (" occ V2 : " + ('{0:N0}' -f $v2Len) + " bytes (" + $v2Pct + "%) v2-vs-v1=" + $v1VsV2 + "%") Write-Host (" gzip(occV2): " + ('{0:N0}' -f $gzOcc2Len) + " bytes (" + $gzOcc2Pct + "%)") Write-Host (" reconstruct: " + $reconStatus) Write-Host "" return [pscustomobject]@{ input_file = $name raw_bytes = $rawLen gzip_raw_bytes = $gzLen occ_v1_bytes = $v1Len occ_v2_bytes = $v2Len gzip_occ_v2_bytes = $gzOcc2Len raw_sha256 = $rawSha reconstructed_sha256 = $v2Sha reconstruction_status = $reconStatus gzip_raw_reduction_pct = $gzPct occ_v1_reduction_pct = $v1Pct occ_v2_reduction_pct = $v2Pct gzip_occ_v2_reduction_pct= $gzOcc2Pct v2_vs_v1_reduction_pct = $v1VsV2 notes = "V2 prototype symbolic dictionary encoder - tier1+tier2 tokens, net-gain threshold, greedy savings-ranked accept. NOT the final patented engine. Round-trip SHA-256 verified." } } # ---- Main ---- $startTime = Get-Date Write-Host "OneCharacterCode benchmark V2 (Optimized prototype)" Write-Host ("Started : " + $startTime.ToString('s')) Write-Host ("Input dir : " + $InputDir) Write-Host ("Output dir: " + $OutputDir) Write-Host ("PowerShell: " + $PSVersionTable.PSVersion.ToString()) Write-Host "" $inputFiles = Get-ChildItem -Path $InputDir -File | Sort-Object Name if ($inputFiles.Count -eq 0) { Write-Error "No input files in $InputDir"; exit 1 } $results = New-Object System.Collections.Generic.List[object] foreach ($f in $inputFiles) { $r = Invoke-FileBenchmarkV2 -InputFile $f.FullName -OutputDir $OutputDir $results.Add($r) | Out-Null } $endTime = Get-Date $report = [ordered]@{ generated_at = $endTime.ToUniversalTime().ToString('o') started_at = $startTime.ToUniversalTime().ToString('o') duration_ms = ($endTime - $startTime).TotalMilliseconds machine_name = $env:COMPUTERNAME ps_version = $PSVersionTable.PSVersion.ToString() test_name = 'OneCharacterCode Benchmark V2 - Optimized Prototype' prototype_note= 'V2 is an improved prototype symbolic dictionary encoder. It is NOT the final patented OneCharacterCode engine. All compression numbers are reported honestly; reconstruction must PASS for any number to count.' optimizations = @( 'Tier 1 = 1-byte tokens for top 8 highest-savings entries', 'Tier 2 = 2-byte tokens (ESC 0x0E + index) for next 256 entries', 'Net-gain threshold per entry: skip if (savings_per_use * count) - dict_cost <= 0', 'Greedy savings-ranked acceptance with overlap rejection', 'Multiple phrase lengths: 32, 24, 16, 12, 10, 8, 6, 5, 4, 3', 'Reserved-byte escape (0x0F prefix) for source bytes in 0x01-0x08, 0x0E, 0x0F', 'gzip(OCC V2) measured separately so reader can see whether OCC helped gzip' ) results = $results } $jsonPath = Join-Path $Root 'benchmark-results-v2.json' $report | ConvertTo-Json -Depth 6 | Set-Content -Path $jsonPath -Encoding UTF8 Write-Host ("Wrote: " + $jsonPath) $lines = New-Object System.Collections.Generic.List[string] $lines.Add('OneCharacterCode benchmark V2 - test run report') $lines.Add('=================================================') $lines.Add('') $lines.Add('Started : ' + $startTime.ToString('s')) $lines.Add('Finished : ' + $endTime.ToString('s')) $lines.Add('Duration : ' + [math]::Round(($endTime - $startTime).TotalSeconds, 2) + ' seconds') $lines.Add('Machine : ' + $env:COMPUTERNAME) $lines.Add('PowerShell: ' + $PSVersionTable.PSVersion.ToString()) $lines.Add('') $lines.Add('Command run:') $lines.Add(' powershell -File run_benchmark_v2.ps1') $lines.Add('') $lines.Add('Optimizations:') foreach ($o in $report.optimizations) { $lines.Add(' - ' + $o) } $lines.Add('') $lines.Add('Inputs tested:') foreach ($r in $results) { $lines.Add(' ' + $r.input_file + ' (' + ('{0:N0}' -f $r.raw_bytes) + ' bytes)') } $lines.Add('') $lines.Add('Results table:') $header = (' {0,-32} {1,8} {2,8} {3,8} {4,8} {5,8} {6,6} {7,8}' -f 'File','Raw','Gzip','OCCv1','OCCv2','gz(v2)','Recon','V2 red%') $lines.Add($header) $lines.Add(' ' + ('-' * 94)) foreach ($r in $results) { $line = (' {0,-32} {1,8} {2,8} {3,8} {4,8} {5,8} {6,6} {7,8}' -f $r.input_file, ('{0:N0}' -f $r.raw_bytes), ('{0:N0}' -f $r.gzip_raw_bytes), ('{0:N0}' -f $r.occ_v1_bytes), ('{0:N0}' -f $r.occ_v2_bytes), ('{0:N0}' -f $r.gzip_occ_v2_bytes), $r.reconstruction_status, ('' + $r.occ_v2_reduction_pct + '%')) $lines.Add($line) } $lines.Add('') $lines.Add('V2 vs V1 (negative number means V2 is smaller than V1, i.e. better):') foreach ($r in $results) { $lines.Add((' {0,-32} v1={1,8} v2={2,8} delta={3}%' -f $r.input_file, ('{0:N0}' -f $r.occ_v1_bytes), ('{0:N0}' -f $r.occ_v2_bytes), $r.v2_vs_v1_reduction_pct)) } $lines.Add('') $lines.Add('Reconstruction status (SHA-256 round-trip):') foreach ($r in $results) { $lines.Add((' {0,-32} {1} (raw={2}... recon={3}...)' -f $r.input_file, $r.reconstruction_status, $r.raw_sha256.Substring(0,16), $r.reconstructed_sha256.Substring(0,16))) } $lines.Add('') $lines.Add('Limitations:') $lines.Add(' - V2 is still a prototype symbolic dictionary encoder, NOT the final') $lines.Add(' patented OneCharacterCode engine. Honest results only.') $lines.Add(' - On short KB-scale inputs gzip and Brotli are mature and very hard to') $lines.Add(' beat. A simple dictionary-substitution prototype - even an improved') $lines.Add(' one - typically will not match them. Results are reported as-is.') $lines.Add(' - V2 improves on V1 in candidate selection, dictionary overhead, and') $lines.Add(' token width. The improvement should be visible in the v2-vs-v1 column.') $lines.Add(' Compare against gzip(raw) to see the gap to standard compression.') $lines.Add(' - gzip(OCC V2) is included so the reader can see whether the prototypes') $lines.Add(' output is more or less compressible to gzip than the raw input.') $lines.Add('') $lines.Add('Next engine improvements (recommended order):') $lines.Add(' - Iterative refinement: after each accepted entry, recompute candidate') $lines.Add(' counts in the working text and re-rank the remaining candidates.') $lines.Add(' - Variable-width tokens (3 tiers): single-byte for the top, two-byte for') $lines.Add(' the middle, three-byte for the long tail.') $lines.Add(' - Structural pattern templates: HTML tag opens/closes, JSON key:value') $lines.Add(' headers, common punctuation runs, indentation runs.') $lines.Add(' - Replace the prototype with the production OneCharacterCode engine and') $lines.Add(' rerun the same harness for an apples-to-apples comparison.') $lines.Add(' - Independent third-party reproduction on the same inputs.') $lines.Add('') $lines.Add('All inputs and outputs are hashed in SHA256_MANIFEST_V2.txt.') $lines.Add('Reproducibility instructions: README_REPRODUCE_V2.txt.') $txtPath = Join-Path $Root 'benchmark-test-run-v2.txt' ($lines -join "`r`n") | Set-Content -Path $txtPath -Encoding UTF8 Write-Host ("Wrote: " + $txtPath) Write-Host "" Write-Host "Done."