Skip to content

Commit cb9c13b

Browse files
cinderblockclaude
andcommitted
README: document the in-memory processing model
Note that decode/encode/mdb-read all load the whole file into memory, why that is fine for EW file sizes, and why streaming isn't pursued (mdb is random-access; compressed-xml would only save down to one ~900 KB section). Documents the decision from this session. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4e6ca0c commit cb9c13b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,16 @@ Decoding covers every supported format. Encoding via the API covers the
246246
compressed-xml containers (`encodeBuffer`); `.prj` in-place editing remains
247247
CLI-only (`ewe`).
248248

249+
### Memory
250+
251+
Everything operates in memory — a file is read whole, decoded/encoded whole,
252+
then written. Peak RAM is on the order of the input plus the decoded output.
253+
This is fine for the file sizes Electronics Workbench produces (KB to a few
254+
MB). Streaming wouldn't help the `.prj`/`.usr` databases anyway (Jet is a
255+
random-access format that `mdb-reader` must load fully), and for the
256+
compressed-xml containers it would only cap RAM at one ~900 KB section — a
257+
marginal win not worth the added complexity at these sizes.
258+
249259
## Tests
250260

251261
```bash
@@ -309,3 +319,17 @@ Notes for maintainers:
309319
`prepublishOnly` script) and are not committed.
310320
- Runtime dependencies are bundled into `dist/`, so the published package
311321
declares none. `THIRD-PARTY-LICENSES.md` carries their license texts.
322+
323+
## See also
324+
325+
- [barncastle's `MultiSimConverter`](https://gist.github.com/barncastle/4277ac44aa47bf8c4389c7df0d160e56)
326+
— a separate, independent C# implementation that handles the same
327+
compressed-xml container. It round-trips the `.ms14` / `.ewprj` container
328+
to and from plain XML by
329+
P/Invoking the original PKWare `IMPLODE.DLL` (so its compression matches
330+
Multisim's exactly, avoiding the [ratio caveat](#compression-ratio-caveat)
331+
above). It dispatches on the same magic strings `ewd` reads
332+
(`MSMCompressedElectronicsWorkbenchXML`, `CompressedElectronicsWorkbenchXML`)
333+
and uses the same 900 000-byte block size. It covers only the compressed-xml
334+
container — not the Jet (`.prj` / `.usr`) part databases, and it doesn't
335+
convert designs to other EDA formats.

0 commit comments

Comments
 (0)