1876, from Fr. massage "friction of kneading," from masser "to massage," possibly from Arabic massa "to touch, feel, handle;" if so, probably picked up in Egypt during the Napoleonic campaign there. Other possibility is that Fr. got it in colonial India from Port. amassar "knead," a verb from L. massa "mass, dough" (see mass (1)). The verb is attested from 1887. Massage parlor first attested 1913, from the start a euphemism for "house of prostitution."
To beat; drub; ROUGH someone UP: caught and massaged with rubber hoses(1924+)
To handle, process, or manipulate data, esp computer data: The results all depend on how you massage it(1966+)
The Dictionary of American Slang, Fourth Edition by Barbara Ann Kipfer, PhD. and Robert L. Chapman, Ph.D. Copyright (C) 2007 by HarperCollins Publishers. Cite This Source
massage in Technology
Vague term used to describe "smooth" transformations of a data set into a different form, especially transformations that do not lose information. Connotes less pain than munch or crunch. "He wrote a program that massages X bitmap files into GIF format." Compare slurp. [Jargon File]