reduce shared ptr and fixed data stream