new version with memcpy implementation ... transfer speed is now > 30MB/s but depends on cpu load