Added block encoding methods.