Post

I've been experimenting with PSObject binary encodings to replace CLIXML - CBOR and Protobuf are both great candidates, with significantly smaller size, but also much faster encoding and decoding performance! Which one would you like to be supported natively in PowerShell?

JSON or BSON are excluded, as they can't preserve 100% of PowerShell object properties the same way CLIXML would. I've tested the CBOR and Protobuf encodings to make sure all edge cases survive an encoding round trip

Notice how I haven't tried ASN.1 😅 but seriously though, CBOR is schema-less and great, Protobuf requires a schema, but could still be adapted to map CLIXML well. Protobuf is what gRPC uses, so the next step would be gRPC-based PSRemoting

Yeah, that's an argument for using CBOR. I was worried Protobuf would import an external dependency but Copilot said it was simple enough to just implement what was needed for PSObject encoding/decoding

0 reposts0 likes

No replies yet.