You can implement a custom ViewStatePersister object which handles this. You probably want to derive it from HiddenFieldPageStatePersister. Take a look at this article which shows how to implement compression on top of ViewState, but is very similar to what you need to do.
There's a little bit of hackiness involved (you'll need to use reflection to set a field of the StateFormatter base class which is (contrary to what the MSDN docs say) not marked as virtual so can't be overridden without reflection.
Justin Grant
2009-10-16 22:13:46