It is not possible to do it exactly in place.
Maybe something you can use is the solution suggested on this answer:
In place extract tar archive
archive="archive.tar"
chunkprefix="chunk_"
# 1-Mb chunks :
chunksize=1048576
totalsize=$(wc -c "$archive" | cut -d ' ' -f 1)
currentchunk=$(((totalsize-1)/chunksize))
while [ $currentchunk -ge 0 ]; do
# Print current chunk number, so we know it is still running.
echo -n "$currentchunk "
offset=$((currentchunk*chunksize))
# Copy end of $archive to new file
tail -c +$((offset+1)) "$archive" > "$chunkprefix$currentchunk"
# Chop end of $archive
truncate -s $offset "$archive"
currentchunk=$((currentchunk-1))
done
What it does is copy a chunk of the file in another file, and immediately delete it from the original.
This way you only need 1MB free disk space (assuming you split into 1MB).
EDIT:
If you have zero free disk space, but have enough ram, you might be able to create a ramdisk and store each chunk there while you delete the original chunk. Haven't tested it though:
ramsize=4096
rammount=/ramdisk
archive="archive.tar"
chunkprefix="$rammount/chunk_"
# 1-Mb chunks :
chunksize=1048576
mkdir $rammount
mkfs -q /dev/ram1 $ramsize
mount /dev/ram1 $rammount
totalsize=$(wc -c "$archive" | cut -d ' ' -f 1)
currentchunk=$(((totalsize-1)/chunksize))
while [ $currentchunk -ge 0 ]; do
# Print current chunk number, so we know it is still running.
echo -n "$currentchunk "
offset=$((currentchunk*chunksize))
# Copy end of $archive to new file
tail -c +$((offset+1)) "$archive" > "$chunkprefix$currentchunk"
# Chop end of $archive
truncate -s $offset "$archive"
# copy the chunk on disk
cp "$chunkprefix$currentchunk" .
currentchunk=$((currentchunk-1))
done
It's exactly the same script, except it starts by creating and mounting a 4MB ramdisk, and temporarily stores each chunk there until it frees up space by truncating de original file.