Voldemort placed his memories inside the diary alongside his soul when he turned it into a Horcrux.
This has nothing to do with Pensieve. The confusion is created because Voldemort is the one who describes the diary as a book of memories. Voldemort, naturally, was very secretive about his Horcruxes and would never name a Horcrux for what it really is under any circumstances. Consequently, Riddle describes the diary as a memory bank. It was actually an alert and living soul piece which had access to Lord Voldemort's memory and life experiences at the moment the Horcrux was created. Kevin makes this point but I thought I'd add a longer answer to explain why exactly this is the case.
We see from the locket in Deathly Hallows that soul pieces in Horcruxes are not dormant, static objects which wait silently in storage. Rather, they are living and listening spirits which respond to what's happening around them.
Ron passed the Horcrux to Harry. After a moment or two, Harry thought he knew what Ron meant. Was it his own blood pulsing through his veins that he could feel, or was it something beating inside the locket, like a tiny metal heart?
(Deathly Hallows, Chapter 14, The Thief).
Harry became aware of the locket against his skin; the thing inside it that sometimes ticked or beat had woken; he could feel it pulsing through the cold gold. Did it know, could it sense, that the thing that would destroy it was near?
(Deathly Hallows, Chapter 17, Bathilda's Secret).
Then something tightened around his neck. He thought of water weeds, though nothing had brushed him as he dived, and raised his empty hand to free himself. It was not weed: the chain of the Horcrux had tightened and was slowly constricting his wind pipe.
(Deathly Hallows, Chapter 19, The Silver Doe).
The soul piece in the Horcrux is audible, beats faster when excited and is even able to attempt executions. The locket-Horcrux replicates the character and personality of the man whose soul it contains. Voldemort is cruel and manipulative, and therefore so is the locket.
Then a voice hissed from out of the Horcrux.
"I have seen your heart, and it is mine."
"Don't listen to it!" Harry said harshly. "Stab it!"
"I have seen your dreams, Ronald Weasley, and I have seen your fears. All that you desire is possible, but all that you fear is also possible..."
"Stab!" shouted Harry; his voice echoed off the surrounding trees, the sword point trembled, and Ron gazed down into Riddle's eyes.
"Least loved, always, by the mother who craved a daughter...least loved, now, by the girl who prefers your friend...second best, always, eternally over-shadowed..."
(Deathly Hallows, Chapter 19, The Silver Doe).
The locket speaks with Riddle's voice and contains Riddle's eye because it contains a piece of Riddle. During this scene it proves its sentience. It speaks, it channels Harry and Hermione and it even bursts out of the confines of its object to become a physical apparition.
Out of the locket's two windows, out of the eyes, there bloomed, like two grotesque bubbles, the heads of Harry and Hermione, weirdly distorted.
Ron yelled in shock and backed away as the figures blossomed out of the locket, first chests, then waists, then legs, until they stood in the locket, side by side like trees with a common root...
(Deathly Hallows, Chapter 19, The Silver Doe).
In other words, the locket-Riddle behaves and acts remarkably like the diary-Riddle. On both cases, neither of them are exactly memories. Both of them are soul-fragments. They live, they wait, they prey and - when powerful enough and when the circumstances allow - they speak and break out of the confines of their Horcrux. The trigger for this in the case of the locket was Harry opening the locket through Parseltongue. The trigger in the case of the diary was Ginny pouring enough of her soul into the diary that Riddle was strong enough to leave.
"But there isn't much life left in her: she put too much into the diary, into me. Enough to let me leave its pages at last."
(Chamber of Secrets, Chapter 17, The Heir of Slytherin).
The abilities that diary-Riddle had to write back, to coerce, to trick, to lie, to pressure and to step out of the diary stemmed from his nature as a soul fragment. The magic that powered him was the magic of Horcruxes, not any spells related to memory, Pensieve or any other branch of magic. Riddle states this directly: it was himself that he put in the diary, not a spell.
"I decided to leave behind a diary, preserving my sixteen year-old self in its pages, so that one day, with luck, I would lead another in my footsteps, and finish Salazar Slytherin's famous work."
(Chamber of Secrets, Chapter 17, The Heir of Slytherin).
Note that he says he put his "self" in the diary, not just his memories.
It is the sixteen year-old Riddle that lives in the diary, and so that particular soul fragment contained the memories of the sixteen year-old Riddle. Consequently, he can take Harry inside his recollection of the capture of Hagrid. It's far more than memory which is in the diary, however. It's Voldemort himself. This is true of all the Horcruxes.
Is that to say that the diary was no different then than all the other Horcruxes? No. As the question rightly states, the diary was different insofar as it was a weapon, not just a soul-container.
"What intrigued and alarmed me most was that the diary had been intended as a weapon as much as a safeguard."
"I still don't understand," said Harry.
"Well, it worked as a Horcrux is supposed to work - in other words, the fragment of soul concealed inside was kept safe and had undoubtedly played its part in preventing the death of its owner. But there could be no doubt that Riddle really wanted that diary read, wanted the piece of soul to inhabit or possess somebody else, so that Slytherin's monster would be unleashed again."
(Half-Blood Prince, Chapter 23, Horcruxes).
The nature of the diary meant that it could possess people and communicate with people in a way in which the other Horcruxes couldn't.
As I've already said, the diary was not different in its ability to be sentient, to speak, to be coercive or to break free from the confines of its object. All the Horcruxes could do this, given the right circumstances. But the diary was not only intended to be read, it was intended to be interacted with. A diary is interactive in a way in which a locket, a ring, a diadem, a snake and a cup really aren't. This meant that it not only fed on the negativity and ill-feeling of those around it, as the locket did; it also sapped the souls of those who wrote in it, weakening them so that possession is possible.
"So Ginny poured out her soul to me, and her soul happened to be exactly what I wanted. I grew stronger and stronger on a diet of her deepest fears, her darkest secrets. I grew powerful, far more powerful than little Miss Weasley. Powerful enough to start feeding Miss Weasley a few of my secrets, to start pouring a little of my soul back into her..."
(Chamber of Secrets, Chapter 17, The Heir of Slytherin).
It is the unique nature of the diary as the means of opening the Chamber of Secrets and as a method of communication which enables possession which seperates it from the other Horcruxes. It's important to understand this distinction to see that it wasn't some extra, unknown magic which gave diary-Riddle the powers he had. He was a Horcrux like any other. But because the object which he was placed in was a diary he was able to sap the souls of anyone who wrote in him, unlike the other Horcruxes. But his memories, his nature and the magic that sustained him was Horcrux-magic, just as it was for the other Horcruxes.
In conclusion, the method "more lasting than ink" by which Riddle retained his memories was through creating Horcruxes. Riddle not only put his memories in the diary, he poured in his very self. The soul fragment in the diary acted autonomously, as all the others did. And it had access to Riddle's memories, as all the others did. The diary could possess people whereas the others couldn't because they were not designed for possession. But in every other respect the diary and the other Horcruxes were exactly alike.