How to split text from pipeline into N files of equal size?

view story

http://serverfault.com – I want to pipe a stream to split. I know how big will be the stream in bytes (very big, comes from network), I want split to create N files of relatively equal size, without splitting lines in half. Is it possible to achieve that. Something like: cat STREAM | split $SIZE_OF_STREAM $NUMBER_OF_FILES_TO_PRODUCE I could not find a way to achieve that through docs, I'm sorry if it was obvious but I couldn't find it. (HowTos)