(command: WriteProtocolMessageType)
| 772 | // Return whether a command contains an uncompressible command term |
| 773 | // Will return true if command contains no uncompressible command terms |
| 774 | static canCompress(command: WriteProtocolMessageType) { |
| 775 | const commandDoc = command instanceof OpMsgRequest ? command.command : command.query; |
| 776 | const commandName = Object.keys(commandDoc)[0]; |
| 777 | return !uncompressibleCommands.has(commandName); |
| 778 | } |
| 779 | |
| 780 | async toBin(): Promise<Uint8Array[]> { |
| 781 | const concatenatedOriginalCommandBuffer = ByteUtils.concat(this.command.toBin()); |
no test coverage detected