Copy TDeserializer and add extra method to avoid array copy

/cc @markhibberd Let me know if this looks OK. In particular I'm not at all sure about what our legal requirements are.