Is it necessary to split the file in to block of the 4MB to compute the correct hash? How can I calculate the content hash for the data block size less then 4MB?
It sounds like you're referring to calculating the "content_hash" value for a file in Dropbox as returned by the Dropbox API. You can find documentation and example code for this on the Content Hash page.
In order to calculate the value correctly, you need to follow the instructions there exactly. That includes always dividing the file into 4 MB pieces. For files smaller than 4 MB, the one (first/last) piece will be smaller than 4 MB. That's acceptable, and your code should proceed normally in that case, following the instructions to compute the value.